Upgrade to httpx 0.20

* Upgrade to httpx 0.20, closes #1488
* TestClient.post() should not default to following redirects
This commit is contained in:
Simon Willison 2021-10-14 11:03:44 -07:00 committed by GitHub
commit b267b57754
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 60 additions and 71 deletions

View file

@ -67,13 +67,13 @@ def test_custom_content_type(custom_pages_client):
def test_redirect(custom_pages_client):
response = custom_pages_client.get("/redirect", allow_redirects=False)
response = custom_pages_client.get("/redirect")
assert 302 == response.status
assert "/example" == response.headers["Location"]
def test_redirect2(custom_pages_client):
response = custom_pages_client.get("/redirect2", allow_redirects=False)
response = custom_pages_client.get("/redirect2")
assert 301 == response.status
assert "/example" == response.headers["Location"]