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

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

Issue 656673003: Docserver: Cache the samples. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 2 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/samples_model.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/samples_model_test.py
diff --git a/chrome/common/extensions/docs/server2/samples_model_test.py b/chrome/common/extensions/docs/server2/samples_model_test.py
index c12f5043cf0da372ccd7ba6cacf3d374552b2aae..2d3a6be0cf8463c7d7c816f9b43cf0c919d7a576 100755
--- a/chrome/common/extensions/docs/server2/samples_model_test.py
+++ b/chrome/common/extensions/docs/server2/samples_model_test.py
@@ -7,6 +7,7 @@ import json
import os
import unittest
+from future import Future
from server_instance import ServerInstance
from test_file_system import TestFileSystem
from test_util import Server2Path
@@ -23,9 +24,7 @@ class _FakeCache(object):
self._cache = obj
def GetFromFileListing(self, _):
- getter = lambda: 0
- getter.Get = lambda: self._cache
- return getter
+ return Future(value=self._cache)
class SamplesModelSourceTest(unittest.TestCase):
@@ -38,7 +37,7 @@ class SamplesModelSourceTest(unittest.TestCase):
def testFilterSamples(self):
self.assertEquals(json.loads(_ReadLocalFile('expected.json')),
- self._samples_model.FilterSamples('bobaloo'))
+ self._samples_model.FilterSamples('bobaloo').Get())
if __name__ == '__main__':
unittest.main()
« no previous file with comments | « chrome/common/extensions/docs/server2/samples_model.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698