MCPcopy
hub / github.com/urllib3/urllib3 / test_status_counter

Method test_status_counter

test/test_retry.py:125–132  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

123 assert e.value.reason == error
124
125 def test_status_counter(self) -> None:
126 resp = HTTPResponse(status=400)
127 retry = Retry(status=2)
128 retry = retry.increment(response=resp)
129 retry = retry.increment(response=resp)
130 msg = ResponseError.SPECIFIC_ERROR.format(status_code=400)
131 with pytest.raises(MaxRetryError, match=msg):
132 retry.increment(response=resp)
133
134 def test_backoff(self) -> None:
135 """Backoff is computed correctly"""

Callers

nothing calls this directly

Calls 3

incrementMethod · 0.95
HTTPResponseClass · 0.90
RetryClass · 0.90

Tested by

no test coverage detected