(self)
| 1902 | assert resp.url == "https://anotherurl.com" |
| 1903 | |
| 1904 | def test_geturl_retries(self) -> None: |
| 1905 | fp = BytesIO(b"") |
| 1906 | resp = HTTPResponse(fp, request_url="http://example.com") |
| 1907 | request_histories = ( |
| 1908 | RequestHistory( |
| 1909 | method="GET", |
| 1910 | url="http://example.com", |
| 1911 | error=None, |
| 1912 | status=301, |
| 1913 | redirect_location="https://example.com/", |
| 1914 | ), |
| 1915 | RequestHistory( |
| 1916 | method="GET", |
| 1917 | url="https://example.com/", |
| 1918 | error=None, |
| 1919 | status=301, |
| 1920 | redirect_location="https://www.example.com", |
| 1921 | ), |
| 1922 | ) |
| 1923 | retry = Retry(history=request_histories) |
| 1924 | resp = HTTPResponse(fp, retries=retry) |
| 1925 | assert resp.geturl() == "https://www.example.com" |
| 1926 | |
| 1927 | @pytest.mark.parametrize( |
| 1928 | ["payload", "expected_stream"], |
nothing calls this directly
no test coverage detected