mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-05 13:35:23 +02:00
updated models/services/tests to include user_id
This commit is contained in:
parent
74d6f58363
commit
0bf3aed287
7 changed files with 19 additions and 12 deletions
|
@ -758,7 +758,7 @@ def test_pagination_order_by_nulls(
|
|||
def test_pagination_shopping_list_items_with_labels(database: AllRepositories, unique_user: TestUser):
|
||||
# create a shopping list and populate it with some items with labels, and some without labels
|
||||
shopping_list = database.group_shopping_lists.create(
|
||||
ShoppingListSave(name=random_string(), group_id=unique_user.group_id)
|
||||
ShoppingListSave(name=random_string(), group_id=unique_user.group_id, user_id=unique_user.user_id)
|
||||
)
|
||||
|
||||
labels = database.group_multi_purpose_labels.create_many(
|
||||
|
|
|
@ -14,7 +14,9 @@ def test_cleanup(database: AllRepositories, unique_user: TestUser):
|
|||
list_repo = database.group_shopping_lists.by_group(unique_user.group_id)
|
||||
list_item_repo = database.group_shopping_list_item
|
||||
|
||||
shopping_list = list_repo.create(ShoppingListSave(name=random_string(), group_id=unique_user.group_id))
|
||||
shopping_list = list_repo.create(
|
||||
ShoppingListSave(name=random_string(), group_id=unique_user.group_id, user_id=unique_user.user_id)
|
||||
)
|
||||
unchecked_items = list_item_repo.create_many(
|
||||
[
|
||||
ShoppingListItemCreate(note=random_string(), shopping_list_id=shopping_list.id)
|
||||
|
@ -57,7 +59,9 @@ def test_no_cleanup(database: AllRepositories, unique_user: TestUser):
|
|||
list_repo = database.group_shopping_lists.by_group(unique_user.group_id)
|
||||
list_item_repo = database.group_shopping_list_item
|
||||
|
||||
shopping_list = list_repo.create(ShoppingListSave(name=random_string(), group_id=unique_user.group_id))
|
||||
shopping_list = list_repo.create(
|
||||
ShoppingListSave(name=random_string(), group_id=unique_user.group_id, user_id=unique_user.user_id)
|
||||
)
|
||||
unchecked_items = list_item_repo.create_many(
|
||||
[
|
||||
ShoppingListItemCreate(note=random_string(), shopping_list_id=shopping_list.id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue