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

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

Issue 10704252: Extensions Docs Server: Internal file system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tests Created 8 years, 5 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/branch_utility_test.py
diff --git a/chrome/common/extensions/docs/server2/branch_utility_test.py b/chrome/common/extensions/docs/server2/branch_utility_test.py
index df872d22fd30673c7256e555f1ba2ae5b1309070..1fff8a91e37e32a182868eca7a350017a7388879 100755
--- a/chrome/common/extensions/docs/server2/branch_utility_test.py
+++ b/chrome/common/extensions/docs/server2/branch_utility_test.py
@@ -4,10 +4,13 @@
# found in the LICENSE file.
import branch_utility
+from fake_url_fetcher import FakeUrlFetcher
import unittest
-import test_urlfetch
class BranchUtilityTest(unittest.TestCase):
+ def setUp(self):
+ self._fetcher = FakeUrlFetcher('test_data')
+
def testSplitChannelNameFromPath(self):
self.assertEquals(('dev', 'hello/stuff.html'),
branch_utility.SplitChannelNameFromPath(
@@ -29,19 +32,19 @@ class BranchUtilityTest(unittest.TestCase):
base_path = 'branch_utility/first.json'
self.assertEquals('1132',
branch_utility.GetBranchNumberForChannelName('dev',
- test_urlfetch,
+ self._fetcher,
base_path))
self.assertEquals('1084',
branch_utility.GetBranchNumberForChannelName('beta',
- test_urlfetch,
+ self._fetcher,
base_path))
self.assertEquals('1234',
branch_utility.GetBranchNumberForChannelName('stable',
- test_urlfetch,
+ self._fetcher,
base_path))
self.assertEquals('trunk',
branch_utility.GetBranchNumberForChannelName('trunk',
- test_urlfetch,
+ self._fetcher,
base_path))
if __name__ == '__main__':

Powered by Google App Engine
This is Rietveld 408576698