🐛 fix(conftest.py): fix client_fixture to properly yield the TestClient instance and clear dependency overrides after usage
This commit is contained in:
parent
8a2358dae0
commit
7b2827f198
1 changed files with 2 additions and 2 deletions
|
|
@ -114,8 +114,8 @@ def client_fixture(session: Session):
|
||||||
app = create_app()
|
app = create_app()
|
||||||
|
|
||||||
app.dependency_overrides[get_session] = get_session_override
|
app.dependency_overrides[get_session] = get_session_override
|
||||||
|
with TestClient(app) as client:
|
||||||
yield TestClient(app)
|
yield client
|
||||||
app.dependency_overrides.clear()
|
app.dependency_overrides.clear()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue