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

Unified Diff: chrome/common/extensions/docs/server2/test_object_store.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/test_object_store.py
diff --git a/chrome/common/extensions/docs/server2/test_object_store.py b/chrome/common/extensions/docs/server2/test_object_store.py
index dcb56ce12c1556d6fd45a4bf1de60bd395ccfacf..c0db64dfc969a46c1a06a5926875a2d96a4dd904 100644
--- a/chrome/common/extensions/docs/server2/test_object_store.py
+++ b/chrome/common/extensions/docs/server2/test_object_store.py
@@ -11,9 +11,12 @@ class TestObjectStore(ObjectStore):
Use CheckAndReset to assert how many times Get/Set/Del have been called. Get
is a special case; it is only incremented once the future has had Get called.
'''
- def __init__(self, namespace, init=None, **optargs):
+ def __init__(self, namespace, start_empty=False, init=None):
self.namespace = namespace
+ self.start_empty = start_empty
self._store = {} if init is None else init
+ if start_empty:
+ assert not self._store
self._get_count = 0
self._set_count = 0
self._del_count = 0

Powered by Google App Engine
This is Rietveld 408576698