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

Method test_secondary_rate_error_without_reset

tests/GithubRetry.py:302–325  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

300 test_increment(retry, response(), expect_retry_error=True)
301
302 def test_secondary_rate_error_without_reset(self):
303 retry = github.GithubRetry(total=3)
304 response = self.response_func(SecondaryRateLimitJson, reset=None)
305 test_increment = self.get_test_increment_func(SecondaryRateLimitMessage)
306
307 retry = test_increment(
308 retry,
309 response(),
310 expected_total=2,
311 expected_backoff=DEFAULT_SECONDARY_RATE_WAIT,
312 )
313 retry = test_increment(
314 retry,
315 response(),
316 expected_total=1,
317 expected_backoff=DEFAULT_SECONDARY_RATE_WAIT,
318 )
319 retry = test_increment(
320 retry,
321 response(),
322 expected_total=0,
323 expected_backoff=DEFAULT_SECONDARY_RATE_WAIT,
324 )
325 test_increment(retry, response(), expect_retry_error=True)
326
327 def test_secondary_rate_error_without_reset_with_exponential_backoff(self):
328 retry = github.GithubRetry(total=3, backoff_factor=10, secondary_rate_wait=5)

Callers

nothing calls this directly

Calls 2

response_funcMethod · 0.95

Tested by

no test coverage detected