Fix test and code

This commit is contained in:
Colin Goutte 2021-09-27 16:50:38 +02:00
parent 9f80bfca2e
commit 723bdb5fca
2 changed files with 3 additions and 2 deletions

View File

@ -11,6 +11,7 @@ app = FastAPI()
mesures = defaultdict(list)
notifications = defaultdict(list)
class Sonde(BaseModel):
@ -45,7 +46,7 @@ def list_sonde():
@app.get("/notifications/{idsonde}/")
def list_notification(idsonde: str):
return [notifications[idsonde][::-1]]
return notifications[idsonde][::-1]
@app.post("/sonde/{idsonde}/")

View File

@ -143,7 +143,7 @@ def test_onchange_notification():
notifs = client.get(f"/notifications/{id_sonde}/")
assert notifs.ok
assert len(notifs) == 1
assert len(notifs.json()) == 1
class CodeCoverageTestCase(TestCase):