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

Unified Diff: chrome/common/extensions/docs/server2/host_file_system_iterator_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/host_file_system_iterator_test.py
diff --git a/chrome/common/extensions/docs/server2/host_file_system_iterator_test.py b/chrome/common/extensions/docs/server2/host_file_system_iterator_test.py
index 22801c9189a0a74f56c2aa063b28282a347c3136..5a6cf3c0b229bdf26b432c92cf33819e0bd3999e 100755
--- a/chrome/common/extensions/docs/server2/host_file_system_iterator_test.py
+++ b/chrome/common/extensions/docs/server2/host_file_system_iterator_test.py
@@ -3,13 +3,15 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+from copy import deepcopy
import unittest
-from host_file_system_creator import HostFileSystemCreator
-from host_file_system_creator_test import ConstructorForTest
+from host_file_system_provider import HostFileSystemProvider
from host_file_system_iterator import HostFileSystemIterator
from object_store_creator import ObjectStoreCreator
from test_branch_utility import TestBranchUtility
+from test_data.canned_data import CANNED_API_FILE_SYSTEM_DATA
+from test_file_system import TestFileSystem
def _GetIterationTracker(version):
@@ -28,13 +30,14 @@ def _GetIterationTracker(version):
class HostFileSystemIteratorTest(unittest.TestCase):
def setUp(self):
- host_file_system_creator = HostFileSystemCreator(
+ def host_file_system_constructor(branch, **optargs):
+ return TestFileSystem(deepcopy(CANNED_API_FILE_SYSTEM_DATA[branch]))
+ host_file_system_provider = HostFileSystemProvider(
ObjectStoreCreator.ForTest(),
- constructor_for_test=ConstructorForTest)
+ constructor_for_test=host_file_system_constructor)
self._branch_utility = TestBranchUtility.CreateWithCannedData()
self._iterator = HostFileSystemIterator(
- host_file_system_creator,
- host_file_system_creator.Create('trunk'),
+ host_file_system_provider,
self._branch_utility)
def _GetStableChannelInfo(self,version):

Powered by Google App Engine
This is Rietveld 408576698