Retry string representation looks the way we expect
(self)
| 20 | |
| 21 | class TestRetry: |
| 22 | def test_string(self) -> None: |
| 23 | """Retry string representation looks the way we expect""" |
| 24 | retry = Retry() |
| 25 | assert ( |
| 26 | str(retry) |
| 27 | == "Retry(total=10, connect=None, read=None, redirect=None, status=None)" |
| 28 | ) |
| 29 | for _ in range(3): |
| 30 | retry = retry.increment(method="GET") |
| 31 | assert ( |
| 32 | str(retry) |
| 33 | == "Retry(total=7, connect=None, read=None, redirect=None, status=None)" |
| 34 | ) |
| 35 | |
| 36 | def test_retry_both_specified(self) -> None: |
| 37 | """Total can win if it's lower than the connect value""" |