Fix test and code
This commit is contained in:
parent
9f80bfca2e
commit
723bdb5fca
|
@ -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}/")
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue