mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
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:
parent
2a8c669039
commit
b267b57754
12 changed files with 60 additions and 71 deletions
|
|
@ -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"]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue