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

Side by Side Diff: chrome/common/extensions/docs/server2/test_object_store_test.py

Issue 13470005: Refactor the devserver to make it easier to control caching (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cduvall, rebase 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 from test_object_store import TestObjectStore
7 import unittest
8
9 class TestObjectStoreTest(unittest.TestCase):
10 def testEmpty(self):
11 store = TestObjectStore('namespace')
12 self.assertEqual(None, store.Get('hi').Get())
13 self.assertEqual({}, store.GetMulti(['hi', 'lo']).Get())
14
15 def testNonEmpty(self):
16 store = TestObjectStore('namespace')
17 store.Set('hi', 'bye')
18 self.assertEqual('bye', store.Get('hi').Get())
19 self.assertEqual({'hi': 'bye'}, store.GetMulti(['hi', 'lo']).Get())
20 store.Set('hi', 'blah')
21 self.assertEqual('blah', store.Get('hi').Get())
22 self.assertEqual({'hi': 'blah'}, store.GetMulti(['hi', 'lo']).Get())
23 store.Delete('hi')
24 self.assertEqual(None, store.Get('hi').Get())
25 self.assertEqual({}, store.GetMulti(['hi', 'lo']).Get())
26
27 if __name__ == '__main__':
28 unittest.main()
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/server2/test_object_store.py ('k') | chrome/common/extensions/docs/server2/url_constants.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698