Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: chrome/common/extensions/docs/server2/memcache_file_system_test.py

Issue 10808065: Extensions Docs Server: TDS fix, no local caching (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import os 6 import os
7 import unittest 7 import unittest
8 8
9 import appengine_memcache as memcache 9 import appengine_memcache as memcache
10 from in_memory_memcache import InMemoryMemcache 10 from in_memory_memcache import InMemoryMemcache
(...skipping 19 matching lines...) Expand all
30 30
31 def testListDir(self): 31 def testListDir(self):
32 expected = ['dir/'] 32 expected = ['dir/']
33 for i in range(7): 33 for i in range(7):
34 expected.append('file%d.html' % i) 34 expected.append('file%d.html' % i)
35 self.assertEqual( 35 self.assertEqual(
36 expected, 36 expected,
37 sorted(self._file_system.Read(['list/']).Get()['list/'])) 37 sorted(self._file_system.Read(['list/']).Get()['list/']))
38 expected.remove('file0.html') 38 expected.remove('file0.html')
39 self._memcache.Set('list/', 39 self._memcache.Set('list/',
40 (expected, 0), 40 (expected, self._file_system.Stat('list/')),
41 memcache.MEMCACHE_FILE_SYSTEM_READ) 41 memcache.MEMCACHE_FILE_SYSTEM_READ)
42 self.assertEqual( 42 self.assertEqual(
43 expected, 43 expected,
44 sorted(self._file_system.Read(['list/']).Get()['list/'])) 44 sorted(self._file_system.Read(['list/']).Get()['list/']))
45 45
46 if __name__ == '__main__': 46 if __name__ == '__main__':
47 unittest.main() 47 unittest.main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698