def ConfigureFakeFetchers(): '''Configure the fake fetcher paths relative to the docs directory. ''' appengine_wrappers.ConfigureFakeUrlFetch({ url_constants.OMAHA_HISTORY: _FakeOmahaHistory(), url_constants.OMAHA_PROXY_URL: _FakeOmahaProxy(), '%s/.*' % url_constants.SVN_URL: _FakeSubversionServer(), '%s/.*' % url_constants.VIEWVC_URL: _FakeViewvcServer(), '%s/.*/commits/.*' % url_constants.GITHUB_REPOS: _FakeGithubStat(), '%s/.*/zipball' % url_constants.GITHUB_REPOS: _FakeGithubZip(), '%s/api/.*' % url_constants.CODEREVIEW_SERVER: _FakeRietveldAPI(), '%s/tarball/.*' % url_constants.CODEREVIEW_SERVER: _FakeRietveldTarball(), '%s/.*' % _GITILES_BASE_RE: _FakeGitilesServer(), '%s/.*' % _GITILES_BRANCH_BASE_RE: _FakeGitilesServer() })
def ConfigureFakeFetchers(docs): '''Configure the fake fetcher paths relative to the docs directory. ''' appengine_wrappers.ConfigureFakeUrlFetch({ url_constants.OMAHA_PROXY_URL: FakeOmahaProxy(docs), '%s/.*' % url_constants.SVN_URL: FakeSubversionServer(docs), '%s/.*' % url_constants.VIEWVC_URL: FakeViewvcServer(docs), '%s/commits/.*' % url_constants.GITHUB_URL: FakeGithubStat(docs), '%s/zipball' % url_constants.GITHUB_URL: FakeGithubZip(docs), re.escape(url_constants.OPEN_ISSUES_CSV_URL): FakeIssuesFetcher(docs), re.escape(url_constants.CLOSED_ISSUES_CSV_URL): FakeIssuesFetcher(docs) })
def ConfigureFakeFetchers(): '''Configure the fake fetcher paths relative to the docs directory. ''' docs = '/'.join((sys.path[0], os.pardir)) appengine_wrappers.ConfigureFakeUrlFetch({ url_constants.OMAHA_PROXY_URL: FakeOmahaProxy(docs), re.escape(url_constants.OMAHA_DEV_HISTORY): FakeOmahaHistory(docs), '%s/.*' % url_constants.SVN_URL: FakeSubversionServer(docs), '%s/.*' % url_constants.VIEWVC_URL: FakeViewvcServer(docs), '%s/commits/.*' % url_constants.GITHUB_URL: FakeGithubStat(docs), '%s/zipball' % url_constants.GITHUB_URL: FakeGithubZip(docs), '%s/api/.*' % url_constants.CODEREVIEW_SERVER: FakeRietveldAPI(docs), '%s/tarball/.*' % url_constants.CODEREVIEW_SERVER: FakeRietveldTarball(docs), })