diff --git a/tests/test_papi.py b/tests/test_papi.py index 36263f6..e378b23 100644 --- a/tests/test_papi.py +++ b/tests/test_papi.py @@ -39,7 +39,14 @@ def test_lister_sondes(): def test_post_data(): id_ = "masonde_001" - data = {"example": "truc"} + from papi.main import mesures + + curlen = len(mesures) + + data = testutils.probe_sample_body() + + response = client.post(f"/sonde/{id_}/", json=data) + assert response.status_code == 200 + assert response.json()["count"] == curlen + 1 + - response = client.post(f"/sonde/{id_}") - assert response.ok