]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Explicitly check is_redirect in simple test case (#208)
authorTammo Behrends <behr.tam@gmail.com>
Wed, 14 Aug 2019 11:22:12 +0000 (13:22 +0200)
committerSeth Michael Larson <sethmichaellarson@gmail.com>
Wed, 14 Aug 2019 11:22:12 +0000 (06:22 -0500)
tests/client/test_redirects.py

index f9c207575e74b337359daa18cb001b48c5184725..3062733a73b2d7146f0a6eb7813100cea8652e24 100644 (file)
@@ -135,11 +135,13 @@ async def test_disallow_redirects():
     )
     assert response.status_code == codes.SEE_OTHER
     assert response.url == URL("https://example.org/redirect_303")
+    assert response.is_redirect is True
     assert len(response.history) == 0
 
     response = await response.next()
     assert response.status_code == codes.OK
     assert response.url == URL("https://example.org/")
+    assert response.is_redirect is False
     assert len(response.history) == 1