TP_JO2024/medaille/tests/test_getMedaille.py

14 lines
314 B
Python
Raw Permalink Normal View History

2024-03-27 15:20:10 +01:00
from models import Medaille
def test_getMedaille(client):
response = client.get("/1")
medaille = Medaille(
id=1,
type="Or",
sport="Judo",
categorie="80kg",
pays="France"
)
assert medaille.model_dump() == response.json
assert response.status_code == 200