1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-08-05 05:25:26 +02:00

feat: Add Households to Mealie (#3970)

This commit is contained in:
Michael Genson 2024-08-22 10:14:32 -05:00 committed by GitHub
parent 0c29cef17d
commit eb170cc7e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
315 changed files with 6975 additions and 3577 deletions

View file

@ -4,7 +4,6 @@ from collections.abc import Generator
import sqlalchemy
from pytest import fixture
from mealie.repos.repository_factory import AllRepositories
from mealie.schema.recipe.recipe import Recipe
from mealie.schema.recipe.recipe_category import CategoryOut, CategorySave
from mealie.schema.recipe.recipe_ingredient import RecipeIngredient
@ -30,7 +29,8 @@ def recipe_store():
@fixture(scope="function")
def recipe_ingredient_only(database: AllRepositories, unique_user: TestUser):
def recipe_ingredient_only(unique_user: TestUser):
database = unique_user.repos
# Create a recipe
recipe = Recipe(
user_id=unique_user.user_id,
@ -55,7 +55,8 @@ def recipe_ingredient_only(database: AllRepositories, unique_user: TestUser):
@fixture(scope="function")
def recipe_categories(database: AllRepositories, unique_user: TestUser) -> Generator[list[CategoryOut], None, None]:
def recipe_categories(unique_user: TestUser) -> Generator[list[CategoryOut], None, None]:
database = unique_user.repos
models: list[CategoryOut] = []
for _ in range(3):
category = CategorySave(
@ -73,7 +74,8 @@ def recipe_categories(database: AllRepositories, unique_user: TestUser) -> Gener
@fixture(scope="function")
def random_recipe(database: AllRepositories, unique_user: TestUser) -> Generator[Recipe, None, None]:
def random_recipe(unique_user: TestUser) -> Generator[Recipe, None, None]:
database = unique_user.repos
recipe = Recipe(
user_id=unique_user.user_id,
group_id=unique_user.group_id,