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

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

Issue 14267024: Devserver: have a separate ObjectStore namespace (both memcache and datastore) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove _CheckVersions 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/object_store_creator_test.py
diff --git a/chrome/common/extensions/docs/server2/object_store_creator_test.py b/chrome/common/extensions/docs/server2/object_store_creator_test.py
index 808bef917e5cfa2b46c0dce8b59ba8c948efb994..41f552c3bbfad58d13c6b3972b105c733c09b0c0 100755
--- a/chrome/common/extensions/docs/server2/object_store_creator_test.py
+++ b/chrome/common/extensions/docs/server2/object_store_creator_test.py
@@ -13,37 +13,27 @@ class _FooClass(object):
class ObjectStoreCreatorTest(unittest.TestCase):
def setUp(self):
- self.creator = ObjectStoreCreator(_FooClass, store_type=TestObjectStore)
+ self.creator = ObjectStoreCreator(_FooClass,
+ '3-0',
+ 'test',
+ store_type=TestObjectStore)
def testVanilla(self):
store = self.creator.Create()
- self.assertEqual('_FooClass', store.namespace)
-
- def testWithVersion(self):
- store = self.creator.Create(version=42)
- self.assertEqual('_FooClass/42', store.namespace)
+ self.assertEqual('3-0/_FooClass@test', store.namespace)
def testWithCategory(self):
store = self.creator.Create(category='cat')
- self.assertEqual('_FooClass/cat', store.namespace)
-
- def testWithVersionAndCategory(self):
- store = self.creator.Create(version=43, category='mat')
- self.assertEqual('_FooClass/mat/43', store.namespace)
+ self.assertEqual('3-0/_FooClass@test/cat', store.namespace)
- def testIllegalIinput(self):
+ def testIllegalInput(self):
self.assertRaises(AssertionError, self.creator.Create, category='5')
self.assertRaises(AssertionError, self.creator.Create, category='forty2')
- self.assertRaises(AssertionError, self.creator.Create, version='twenty')
- self.assertRaises(AssertionError, self.creator.Create, version='7a')
def testFactoryWithBranch(self):
- store = ObjectStoreCreator.Factory().Create(
- _FooClass, store_type=TestObjectStore).Create()
- self.assertEqual('_FooClass', store.namespace)
- store = ObjectStoreCreator.Factory(branch='dev').Create(
+ store = ObjectStoreCreator.Factory('3-0', 'dev').Create(
_FooClass, store_type=TestObjectStore).Create()
- self.assertEqual('_FooClass@dev', store.namespace)
+ self.assertEqual('3-0/_FooClass@dev', store.namespace)
if __name__ == '__main__':
unittest.main()

Powered by Google App Engine
This is Rietveld 408576698