Skip to content

Commit 82097e9

Browse files
committed
Follow HTTP redirects when running tests
This is needed as HTTPX no longer follows redirects by default, as of version 0.20.0
1 parent 34cabd5 commit 82097e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,5 @@ def app(override_db_session: Callable) -> FastAPI:
6969
@pytest.fixture()
7070
async def client(app: FastAPI) -> AsyncClient:
7171
"""Return a client for testing the app."""
72-
async with AsyncClient(app=app, base_url='http://testserver') as ac:
72+
async with AsyncClient(app=app, base_url='http://testserver', follow_redirects=True) as ac:
7373
yield ac

0 commit comments

Comments
 (0)