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

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

Issue 23867003: Docserver: Consolidate features caching and access. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: let's try this again, shall we? Created 7 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/svn_constants.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/template_data_source_test.py
diff --git a/chrome/common/extensions/docs/server2/template_data_source_test.py b/chrome/common/extensions/docs/server2/template_data_source_test.py
index 197d1b35d402fcbf7cb8be4f1173dbb9d20e5a67..d41950b9791319a739ab5069dc85cd7d95098221 100755
--- a/chrome/common/extensions/docs/server2/template_data_source_test.py
+++ b/chrome/common/extensions/docs/server2/template_data_source_test.py
@@ -9,6 +9,7 @@ import sys
import unittest
from api_data_source import APIDataSource
+from features_bundle import FeaturesBundle
from compiled_file_system import CompiledFileSystem
from local_file_system import LocalFileSystem
from object_store_creator import ObjectStoreCreator
@@ -33,6 +34,17 @@ class _FakeFactory(object):
return self._input_dict
+class _FakeFeaturesBundle(object):
+ def GetPermissionFeatures(self):
+ return {}
+
+
+class _FakeServerInstance(object):
+ def __init__(self):
+ self.features_bundle = _FakeFeaturesBundle()
+ self.object_store_creator = ObjectStoreCreator.ForTest()
+
+
class TemplateDataSourceTest(unittest.TestCase):
def setUp(self):
@@ -42,8 +54,7 @@ class TemplateDataSourceTest(unittest.TestCase):
self._fake_api_list_data_source_factory = _FakeFactory()
self._fake_intro_data_source_factory = _FakeFactory()
self._fake_samples_data_source_factory = _FakeFactory()
- self._permissions_data_source = PermissionsDataSource(
- _FakeFactory(), LocalFileSystem.Create(), '', '', '')
+ self._permissions_data_source = PermissionsDataSource(_FakeServerInstance())
def _ReadLocalFile(self, filename):
with open(os.path.join(self._base_path, filename), 'r') as f:
« no previous file with comments | « chrome/common/extensions/docs/server2/svn_constants.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698