MCPcopy Create free account
hub / github.com/SourceCode-AI/aura / test_github_rate_limit_reached

Function test_github_rate_limit_reached

tests/test_github.py:71–89  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

69
70@responses.activate
71def test_github_rate_limit_reached():
72 responses.add(
73 responses.GET,
74 "https://api.github.com/repos/psf/requests",
75 headers={
76 "X-Ratelimit-Remaining": "0",
77 "X-Ratelimit-Reset": "666"
78 },
79 status=403
80 )
81
82 assert github.GitHub.x_api_reset is None
83 assert github.GitHub.x_api_remaining is None
84
85 with pytest.raises(exceptions.RateLimitError):
86 _ = github.GitHub.from_url("https://github.com/psf/requests")
87
88 assert github.GitHub.x_api_reset == 666
89 assert github.GitHub.x_api_remaining == 0

Callers

nothing calls this directly

Calls 1

from_urlMethod · 0.80

Tested by

no test coverage detected