fix: use TestClient as context manager to trigger lifespan
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user