Check measures registration

This commit is contained in:
Colin Goutte 2021-09-27 15:24:38 +02:00
parent 6f75ce0adf
commit 5b25c9aea7
1 changed files with 10 additions and 3 deletions

View File

@ -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