mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 14:33:33 -07:00
fixup tests
Signed-off-by: Litchi Pi <litchi.pi@proton.me>
This commit is contained in:
parent
c32c9d4502
commit
1778790947
2 changed files with 7 additions and 2 deletions
|
@ -175,7 +175,7 @@ def test_organizer_association(
|
|||
]
|
||||
|
||||
# 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
|
||||
|
||||
# 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"]}
|
||||
]
|
||||
|
||||
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
|
||||
|
||||
# Get Organizer by Slug
|
||||
|
|
|
@ -470,6 +470,11 @@ def test_read_update(
|
|||
assert response.status_code == 200
|
||||
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)
|
||||
assert response.status_code == 200
|
||||
recipe = json.loads(response.text)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue