diff --git a/backend/tests/test_auth.py b/backend/tests/test_auth.py index fb79b81..f811cd3 100644 --- a/backend/tests/test_auth.py +++ b/backend/tests/test_auth.py @@ -1,9 +1,14 @@ # tests/test_auth.py +import pytest from fastapi.testclient import TestClient from backend.main import app -client = TestClient(app) + +@pytest.fixture(scope="module") +def client(): + with TestClient(app) as test_client: # ensures lifespan/startup executes + yield test_client def test_login_success():