diff --git a/papi/main.py b/papi/main.py index 028ad74..83013ef 100644 --- a/papi/main.py +++ b/papi/main.py @@ -5,6 +5,8 @@ from fastapi import FastAPI app = FastAPI() +sondes = [] + class Sonde(BaseModel): identifiant: str diff --git a/tests/test_papi.py b/tests/test_papi.py index 255afd5..6505835 100644 --- a/tests/test_papi.py +++ b/tests/test_papi.py @@ -3,6 +3,8 @@ from fastapi.testclient import TestClient from papi.main import app +from papi.main import sondes + from papi import __version__ client = TestClient(app) @@ -22,3 +24,4 @@ def test_creer_sonde(): sonde1 = {"identifiant": "masonde_001", "nom": "client1"} response = client.post("/sonde/", json=sonde1) assert response.status_code == 200 + assert sonde1 in sondes