MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / testShouldDeferRequests

Method testShouldDeferRequests

tests/Requester.py:606–614  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

604 super().setUp()
605
606 def testShouldDeferRequests(self):
607 with self.mock_sleep() as sleep_mock:
608 with self.replayData("RequesterThrottleTestCase.testDeferRequests.txt"):
609 # same test setup as in RequesterUnThrottled.testShouldNotDeferRequests
610 repository = self.g.get_repo(REPO_NAME)
611 releases = [release for release in repository.get_releases()]
612 self.assertEqual(len(releases), 30)
613
614 self.assertEqual(sleep_mock.call_args_list, [mock.call(1), mock.call(1), mock.call(1)])
615
616 def testShouldDeferWrites(self):
617 with self.mock_sleep() as sleep_mock:

Callers

nothing calls this directly

Calls 4

mock_sleepMethod · 0.80
replayDataMethod · 0.80
get_releasesMethod · 0.80
get_repoMethod · 0.45

Tested by

no test coverage detected