Skip to content

Commit 467b087

Browse files
authored
fix: use conftest client fixture + fix wrong 'status' key assertion in test_health.py
1 parent a08454a commit 467b087

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

backend/tests/test_health.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
import pytest
12
from fastapi.testclient import TestClient
23
from backend.main import app
34

4-
client = TestClient(app)
55

6-
def test_health_root():
6+
def test_health_root(client):
77
resp = client.get("/")
88
assert resp.status_code == 200
9-
assert "status" in resp.json() or resp.text != ""
9+
assert "message" in resp.json()

0 commit comments

Comments
 (0)