mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-02 20:15:24 +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
6
tests/fixtures/fixture_shopping_lists.py
vendored
6
tests/fixtures/fixture_shopping_lists.py
vendored
|
@ -29,7 +29,7 @@ def shopping_lists(database: AllRepositories, unique_user: TestUser):
|
|||
|
||||
for _ in range(3):
|
||||
model = database.group_shopping_lists.create(
|
||||
ShoppingListSave(name=random_string(10), group_id=unique_user.group_id),
|
||||
ShoppingListSave(name=random_string(10), group_id=unique_user.group_id, user_id=unique_user.user_id),
|
||||
)
|
||||
|
||||
models.append(model)
|
||||
|
@ -46,7 +46,7 @@ def shopping_lists(database: AllRepositories, unique_user: TestUser):
|
|||
@pytest.fixture(scope="function")
|
||||
def shopping_list(database: AllRepositories, unique_user: TestUser):
|
||||
model = database.group_shopping_lists.create(
|
||||
ShoppingListSave(name=random_string(10), group_id=unique_user.group_id),
|
||||
ShoppingListSave(name=random_string(10), group_id=unique_user.group_id, user_id=unique_user.user_id),
|
||||
)
|
||||
|
||||
yield model
|
||||
|
@ -60,7 +60,7 @@ def shopping_list(database: AllRepositories, unique_user: TestUser):
|
|||
@pytest.fixture(scope="function")
|
||||
def list_with_items(database: AllRepositories, unique_user: TestUser):
|
||||
list_model = database.group_shopping_lists.create(
|
||||
ShoppingListSave(name=random_string(10), group_id=unique_user.group_id),
|
||||
ShoppingListSave(name=random_string(10), group_id=unique_user.group_id, user_id=unique_user.user_id),
|
||||
)
|
||||
|
||||
for _ in range(10):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue