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

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

Issue 14856006: Docserver: achieve online vs offline (cron vs instance) behaviour at the object (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/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 41f552c3bbfad58d13c6b3972b105c733c09b0c0..e665b3f3cfef9210d0abd0328d3ed101e67e9fb0 100755
--- a/chrome/common/extensions/docs/server2/object_store_creator_test.py
+++ b/chrome/common/extensions/docs/server2/object_store_creator_test.py
@@ -16,6 +16,7 @@ class ObjectStoreCreatorTest(unittest.TestCase):
self.creator = ObjectStoreCreator(_FooClass,
'3-0',
'test',
+ ObjectStoreCreator.START_POPULATED,
store_type=TestObjectStore)
def testVanilla(self):
@@ -31,9 +32,22 @@ class ObjectStoreCreatorTest(unittest.TestCase):
self.assertRaises(AssertionError, self.creator.Create, category='forty2')
def testFactoryWithBranch(self):
- store = ObjectStoreCreator.Factory('3-0', 'dev').Create(
- _FooClass, store_type=TestObjectStore).Create()
+ store = ObjectStoreCreator.Factory(
+ '3-0',
+ 'dev',
+ ObjectStoreCreator.START_POPULATED).Create(
+ _FooClass, store_type=TestObjectStore).Create()
self.assertEqual('3-0/_FooClass@dev', store.namespace)
+ def testStartConfiguration(self):
+ store = (ObjectStoreCreator.TestFactory(
+ start_configuration=ObjectStoreCreator.START_POPULATED)
+ .Create(_FooClass).Create())
+ self.assertFalse(store.start_empty)
+ store = (ObjectStoreCreator.TestFactory(
+ start_configuration=ObjectStoreCreator.START_EMPTY)
+ .Create(_FooClass).Create())
+ self.assertTrue(store.start_empty)
+
if __name__ == '__main__':
unittest.main()

Powered by Google App Engine
This is Rietveld 408576698