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

Side by Side Diff: appengine/findit/libs/test/cache_decorator_test.py

Issue 2538373003: [Culprit-Finder] Merge lib/ to libs/. (Closed)
Patch Set: . Created 4 years 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
« no previous file with comments | « appengine/findit/libs/test/__init__.py ('k') | appengine/findit/libs/test/time_util_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import pickle 5 import pickle
6 import zlib 6 import zlib
7 7
8 from testing_utils import testing 8 from testing_utils import testing
9 9
10 from lib import cache 10 from libs import cache
11 from lib import cache_decorator 11 from libs import cache_decorator
12 12
13 13
14 class _DummyCache(cache.Cache): 14 class _DummyCache(cache.Cache):
15 def __init__(self, cached_data): 15 def __init__(self, cached_data):
16 self.cached_data = cached_data 16 self.cached_data = cached_data
17 17
18 def Get(self, key): 18 def Get(self, key):
19 return self.cached_data.get(key) 19 return self.cached_data.get(key)
20 20
21 def Set(self, key, data, expire_time=0): 21 def Set(self, key, data, expire_time=0):
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 return self.url + '/' + path 119 return self.url + '/' + path
120 120
121 a1 = A('http://test', 3) 121 a1 = A('http://test', 3)
122 self.assertEqual('http://test/p1', a1.Func('p1')) 122 self.assertEqual('http://test/p1', a1.Func('p1'))
123 self.assertEqual('http://test/p1', a1.Func('p1')) 123 self.assertEqual('http://test/p1', a1.Func('p1'))
124 self.assertEqual(1, a1.runs) 124 self.assertEqual(1, a1.runs)
125 125
126 a2 = A('http://test', 5) 126 a2 = A('http://test', 5)
127 self.assertEqual('http://test/p1', a2.Func('p1')) 127 self.assertEqual('http://test/p1', a2.Func('p1'))
128 self.assertEqual(0, a2.runs) 128 self.assertEqual(0, a2.runs)
OLDNEW
« no previous file with comments | « appengine/findit/libs/test/__init__.py ('k') | appengine/findit/libs/test/time_util_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698