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

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

Issue 26418002: Docserver: Pull knowledge of host file systems into a single (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: correct similarity 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
Index: chrome/common/extensions/docs/server2/availability_finder_test.py
diff --git a/chrome/common/extensions/docs/server2/availability_finder_test.py b/chrome/common/extensions/docs/server2/availability_finder_test.py
index 0cfc373bec7e0211ae6ea8f66f0983d5b5821df2..1540f36378ed0d5c171fc069d70a3dc1e3840a96 100755
--- a/chrome/common/extensions/docs/server2/availability_finder_test.py
+++ b/chrome/common/extensions/docs/server2/availability_finder_test.py
@@ -20,12 +20,15 @@ from test_data.canned_data import (CANNED_API_FILE_SYSTEM_DATA, CANNED_BRANCHES)
from test_data.object_level_availability.tabs import TABS_SCHEMA_BRANCHES
-class FakeHostFileSystemCreator(object):
+class FakeHostFileSystemProvider(object):
def __init__(self, file_system_data):
self._file_system_data = file_system_data
- def Create(self, branch):
+ def GetTrunk(self):
+ return self.GetBranch('trunk')
+
+ def GetBranch(self, branch):
return TestFileSystem(self._file_system_data[str(branch)])
@@ -39,15 +42,12 @@ class AvailabilityFinderTest(unittest.TestCase):
ObjectStoreCreator.ForTest())
def create_availability_finder(file_system_data):
- fake_host_fs_creator = FakeHostFileSystemCreator(file_system_data)
- fake_host_fs = fake_host_fs_creator.Create('trunk')
- return AvailabilityFinder(HostFileSystemIterator(
- fake_host_fs_creator,
- fake_host_fs,
- self._branch_utility),
+ fake_host_fs_creator = FakeHostFileSystemProvider(file_system_data)
+ return AvailabilityFinder(HostFileSystemIterator(fake_host_fs_creator,
+ self._branch_utility),
ObjectStoreCreator.ForTest(),
self._branch_utility,
- fake_host_fs)
+ fake_host_fs_creator.GetTrunk())
self._avail_finder = create_availability_finder(CANNED_API_FILE_SYSTEM_DATA)
self._node_avail_finder = create_availability_finder(TABS_SCHEMA_BRANCHES)
« no previous file with comments | « chrome/common/extensions/docs/server2/app_yaml_helper_test.py ('k') | chrome/common/extensions/docs/server2/branch_utility.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698