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

Unified Diff: chrome/common/extensions/docs/server2/compiled_file_system_test.py

Issue 13599004: Fix some low hanging inefficiencies in the docs server (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/server2/compiled_file_system_test.py
diff --git a/chrome/common/extensions/docs/server2/compiled_file_system_test.py b/chrome/common/extensions/docs/server2/compiled_file_system_test.py
index d8bf452d2e48774deca445445fb78fee69a8a91f..25d5990611b277cc48a540ffb206e299529fe70b 100755
--- a/chrome/common/extensions/docs/server2/compiled_file_system_test.py
+++ b/chrome/common/extensions/docs/server2/compiled_file_system_test.py
@@ -49,13 +49,16 @@ class CompiledFileSystemTest(unittest.TestCase):
def testIdentityFromFileListing(self):
compiled_fs = _CreateFactory().GetOrCreateIdentity()
- self.assertEqual({'404.html', 'apps/a11y.html', 'apps/about_apps.html',
- 'apps/fakedir/file.html',
- 'extensions/activeTab.html', 'extensions/alarms.html'},
+ self.assertEqual(set(('404.html',
+ 'apps/a11y.html',
+ 'apps/about_apps.html',
+ 'apps/fakedir/file.html',
+ 'extensions/activeTab.html',
+ 'extensions/alarms.html')),
set(compiled_fs.GetFromFileListing('/')))
- self.assertEqual({'a11y.html', 'about_apps.html', 'fakedir/file.html'},
+ self.assertEqual(set(('a11y.html', 'about_apps.html', 'fakedir/file.html')),
set(compiled_fs.GetFromFileListing('apps/')))
- self.assertEqual({'file.html'},
+ self.assertEqual(set(('file.html',)),
set(compiled_fs.GetFromFileListing('apps/fakedir')))
def testPopulateNamespace(self):
@@ -92,18 +95,18 @@ class CompiledFileSystemTest(unittest.TestCase):
def testCaching(self):
compiled_fs = _CreateFactory().GetOrCreateIdentity()
self.assertEqual('404.html contents', compiled_fs.GetFromFile('404.html'))
- self.assertEqual({'file.html'},
+ self.assertEqual(set(('file.html',)),
set(compiled_fs.GetFromFileListing('apps/fakedir')))
compiled_fs._file_system._obj['404.html'] = 'boom'
compiled_fs._file_system._obj['apps']['fakedir']['boom.html'] = 'blam'
self.assertEqual('404.html contents', compiled_fs.GetFromFile('404.html'))
- self.assertEqual({'file.html'},
+ self.assertEqual(set(('file.html',)),
set(compiled_fs.GetFromFileListing('apps/fakedir')))
compiled_fs._file_system.IncrementStat()
self.assertEqual('boom', compiled_fs.GetFromFile('404.html'))
- self.assertEqual({'file.html', 'boom.html'},
+ self.assertEqual(set(('file.html', 'boom.html')),
set(compiled_fs.GetFromFileListing('apps/fakedir')))
def testFailures(self):

Powered by Google App Engine
This is Rietveld 408576698