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

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

Issue 14218004: Devserver: only populate data during cron jobs, meaning all data from instances (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix integration test 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
« no previous file with comments | « chrome/common/extensions/docs/server2/test_object_store.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/docs/server2/test_object_store_test.py
diff --git a/chrome/common/extensions/docs/server2/test_object_store_test.py b/chrome/common/extensions/docs/server2/test_object_store_test.py
index 448fce3f469c54963e6c075b647dcbc5582a84b5..a84978c0276819aab553d57e107c1c240f47c34f 100755
--- a/chrome/common/extensions/docs/server2/test_object_store_test.py
+++ b/chrome/common/extensions/docs/server2/test_object_store_test.py
@@ -20,9 +20,24 @@ class TestObjectStoreTest(unittest.TestCase):
store.Set('hi', 'blah')
self.assertEqual('blah', store.Get('hi').Get())
self.assertEqual({'hi': 'blah'}, store.GetMulti(['hi', 'lo']).Get())
- store.Delete('hi')
+ store.Del('hi')
self.assertEqual(None, store.Get('hi').Get())
self.assertEqual({}, store.GetMulti(['hi', 'lo']).Get())
+ def testCheckAndReset(self):
+ store = TestObjectStore('namespace')
+ store.Set('x', 'y')
+ self.assertTrue(store.CheckAndReset(set_count=1))
+ store.Set('x', 'y')
+ store.Set('x', 'y')
+ self.assertTrue(store.CheckAndReset(set_count=2))
+ store.Set('x', 'y')
+ store.Set('x', 'y')
+ store.Get('x')
+ store.Get('x')
+ store.Get('x')
+ store.Del('x')
+ self.assertTrue(store.CheckAndReset(get_count=3, set_count=2, del_count=1))
+
if __name__ == '__main__':
unittest.main()
« no previous file with comments | « chrome/common/extensions/docs/server2/test_object_store.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698