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

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

Issue 10871002: Extensions Docs Server: Testing GithubFileSystem and cron jobs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: small changes Created 8 years, 4 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/fake_fetchers.py
diff --git a/chrome/common/extensions/docs/server2/fake_fetchers.py b/chrome/common/extensions/docs/server2/fake_fetchers.py
index 9fc62095fc0fcd8f4ba018f9f0cf59f5734f64e8..26e94eed1b9c9366596dc052f360522652b64236 100644
--- a/chrome/common/extensions/docs/server2/fake_fetchers.py
+++ b/chrome/common/extensions/docs/server2/fake_fetchers.py
@@ -68,14 +68,21 @@ class FakeViewvcServer(object):
return '\n'.join(html)
return _ReadFile(path)
-class FakeGithub(object):
+class FakeGithubStat(object):
def fetch(self, url):
return '{ "commit": { "tree": { "sha": 0} } }'
+class FakeGithubZip(object):
+ def fetch(self, url):
+ return _ReadFile(os.path.join('test_data',
+ 'github_file_system',
+ 'apps_samples.zip'))
+
def ConfigureFakeFetchers():
appengine_wrappers.ConfigureFakeUrlFetch({
url_constants.OMAHA_PROXY_URL: FakeOmahaProxy(),
'%s/.*' % url_constants.SVN_URL: FakeSubversionServer(),
'%s/.*' % url_constants.VIEWVC_URL: FakeViewvcServer(),
- '%s/.*' % url_constants.GITHUB_URL: FakeGithub()
+ '%s/commits/.*' % url_constants.GITHUB_URL: FakeGithubStat(),
+ '%s/zipball' % url_constants.GITHUB_URL: FakeGithubZip()
})

Powered by Google App Engine
This is Rietveld 408576698