fixup tests

Signed-off-by: Litchi Pi <litchi.pi@proton.me>
This commit is contained in:
Litchi Pi 2025-07-23 13:07:55 +02:00
commit 1778790947
2 changed files with 7 additions and 2 deletions

View file

@ -175,7 +175,7 @@ def test_organizer_association(
] ]
# Update Recipe # Update Recipe
response = api_client.put(api_routes.recipes_slug(slug), json=as_json, headers=unique_user.token) response = api_client.patch(api_routes.recipes_slug(slug), json=as_json, headers=unique_user.token)
assert response.status_code == 200 assert response.status_code == 200
# Get Recipe Data # Get Recipe Data
@ -223,7 +223,7 @@ def test_organizer_get_by_slug(
{"id": item["id"], "group_id": unique_user.group_id, "name": item["name"], "slug": item["slug"]} {"id": item["id"], "group_id": unique_user.group_id, "name": item["name"], "slug": item["slug"]}
] ]
response = api_client.put(api_routes.recipes_slug(slug), json=as_json, headers=unique_user.token) response = api_client.patch(api_routes.recipes_slug(slug), json=as_json, headers=unique_user.token)
assert response.status_code == 200 assert response.status_code == 200
# Get Organizer by Slug # Get Organizer by Slug

View file

@ -470,6 +470,11 @@ def test_read_update(
assert response.status_code == 200 assert response.status_code == 200
assert json.loads(response.text).get("slug") == recipe_data.expected_slug assert json.loads(response.text).get("slug") == recipe_data.expected_slug
recipe_incomplete = recipe.copy()
del recipe_incomplete["notes"]
response = api_client.put(recipe_url, json=utils.jsonify(recipe_incomplete), headers=unique_user.token)
assert response.status_code == 400
response = api_client.get(recipe_url, headers=unique_user.token) response = api_client.get(recipe_url, headers=unique_user.token)
assert response.status_code == 200 assert response.status_code == 200
recipe = json.loads(response.text) recipe = json.loads(response.text)