Add notification route listing for probes
This commit is contained in:
parent
7571e2578d
commit
9f80bfca2e
|
@ -43,6 +43,11 @@ def list_sonde():
|
|||
return [x for x in sondes.values()]
|
||||
|
||||
|
||||
@app.get("/notifications/{idsonde}/")
|
||||
def list_notification(idsonde: str):
|
||||
return [notifications[idsonde][::-1]]
|
||||
|
||||
|
||||
@app.post("/sonde/{idsonde}/")
|
||||
def post_sonde_data(idsonde: str, body: dict = Body(...)):
|
||||
if idsonde not in sondes:
|
||||
|
|
|
@ -141,7 +141,7 @@ def test_onchange_notification():
|
|||
jresp = response.json()
|
||||
assert not jresp["notify"]
|
||||
|
||||
notifs = client.get(f"notifications/{id_sonde}/")
|
||||
notifs = client.get(f"/notifications/{id_sonde}/")
|
||||
assert notifs.ok
|
||||
assert len(notifs) == 1
|
||||
|
||||
|
|
Loading…
Reference in New Issue