fix: use TestClient as context manager to trigger lifespan

This commit is contained in:
2026-03-18 15:05:01 -05:00
parent 9b1108da5c
commit ea3da00b95
5 changed files with 15 additions and 10 deletions

View File

@@ -5,9 +5,8 @@ from src.naliiabotapi.main import app
@pytest.fixture
def client():
client = TestClient(app)
return client
with TestClient(app) as client:
yield client
def test_root(client):