before gemiin
This commit is contained in:
@@ -26,3 +26,13 @@ def test_update_task_statut(client):
|
||||
r2 = client.put(f"/api/tasks/{id}", json={"titre": "À faire", "statut": "fait"})
|
||||
assert r2.status_code == 200
|
||||
assert r2.json()["statut"] == "fait"
|
||||
|
||||
|
||||
def test_filter_tasks_by_planting_id(client):
|
||||
client.post("/api/tasks", json={"titre": "Template arrosage", "statut": "template"})
|
||||
client.post("/api/tasks", json={"titre": "Arroser rang 1", "statut": "a_faire", "planting_id": 10})
|
||||
client.post("/api/tasks", json={"titre": "Arroser rang 2", "statut": "a_faire", "planting_id": 11})
|
||||
r = client.get("/api/tasks?planting_id=10")
|
||||
assert r.status_code == 200
|
||||
assert len(r.json()) == 1
|
||||
assert r.json()[0]["planting_id"] == 10
|
||||
|
||||
Reference in New Issue
Block a user