From b21df42421b72b0eb75b134952f6808e0fd69524 Mon Sep 17 00:00:00 2001 From: Michael Genson <71845777+michael-genson@users.noreply.github.com> Date: Sat, 31 Dec 2022 04:41:25 +0000 Subject: [PATCH 1/2] fixed broken types --- tests/utils/assertion_helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/utils/assertion_helpers.py b/tests/utils/assertion_helpers.py index 371f4a36eab..072ec184713 100644 --- a/tests/utils/assertion_helpers.py +++ b/tests/utils/assertion_helpers.py @@ -1,7 +1,7 @@ -from requests import Response +from httpx import Response -def assert_ignore_keys(dict1: dict, dict2: dict, ignore_keys: list = None) -> None: +def assert_ignore_keys(dict1: dict, dict2: dict, ignore_keys: list | None = None) -> None: """ Itterates through a list of keys and checks if they are in the the provided ignore_keys list, if they are not in the ignore_keys list, it checks the value of the key in the provided against From 4b76f2d691b92cbd88fedf0b48027552f4a852c7 Mon Sep 17 00:00:00 2001 From: Michael Genson <71845777+michael-genson@users.noreply.github.com> Date: Sat, 31 Dec 2022 05:44:10 +0000 Subject: [PATCH 2/2] changed remove recipe route from delete to post --- frontend/lib/api/user/group-shopping-lists.ts | 5 +++-- .../groups/controller_shopping_lists.py | 2 +- .../test_group_shopping_lists.py | 20 ++++++++++--------- tests/utils/api_routes/__init__.py | 5 +++++ 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/frontend/lib/api/user/group-shopping-lists.ts b/frontend/lib/api/user/group-shopping-lists.ts index f4100c7fe23..4b9067533ee 100644 --- a/frontend/lib/api/user/group-shopping-lists.ts +++ b/frontend/lib/api/user/group-shopping-lists.ts @@ -15,6 +15,7 @@ const routes = { shoppingLists: `${prefix}/groups/shopping/lists`, shoppingListsId: (id: string) => `${prefix}/groups/shopping/lists/${id}`, shoppingListIdAddRecipe: (id: string, recipeId: string) => `${prefix}/groups/shopping/lists/${id}/recipe/${recipeId}`, + shoppingListIdRemoveRecipe: (id: string, recipeId: string) => `${prefix}/groups/shopping/lists/${id}/recipe/${recipeId}/delete`, shoppingListItems: `${prefix}/groups/shopping/items`, shoppingListItemsId: (id: string) => `${prefix}/groups/shopping/items/${id}`, @@ -28,8 +29,8 @@ export class ShoppingListsApi extends BaseCRUDAPI