MCPcopy
hub / github.com/kubernetes/test-infra / init_github_fake

Method init_github_fake

gubernator/github/periodic_sync_test.py:91–96  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

89 header.set_value(v)
90
91 def init_github_fake(self):
92 # Theoretically, I should be able to pass this to init_urlfetch_stub.
93 # Practically, that doesn't work for unknown reasons, and this is fine.
94 uf = self.testbed.get_stub('urlfetch')
95 uf._urlmatchers_to_fetch_functions.append( # pylint: disable=protected-access
96 (lambda u: u.startswith('https://api.github.com'), self.urlfetch_github_stub))
97
98 def test_get_prs_from_github(self):
99 self.init_github_fake()

Callers 2

test_sync_repoMethod · 0.95

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected