Files
mealie/mealie/tests/test_routes/utils/routes_data.py
Hayden 874bea7fa4 v0.2.0 Updates (#130)
* migration redesign init

* new color picker

* changelog

* added UI language selection

* fix layout issue on recipe editor

* remove git as dependency

* added UI editor for original URL

* CI/CD Tests

* test: fixed migration routes

* test todos

* bug/added docker volume

* chowdow test data

* partial image recipe image testing

* added card section card

* settings form

* homepage cetegory ui

* frontend category placeholder

* fixed broken scheduler

* remove old files

* removed temp test

Co-authored-by: Hayden <hay-kot@pm.me>
2021-01-29 19:31:24 -08:00

112 lines
3.1 KiB
Python

class RecipeTestData:
def __init__(self, url, expected_slug) -> None:
self.url: str = url
self.expected_slug: str = expected_slug
recipe_test_data = [
RecipeTestData(
url="https://www.bonappetit.com/recipe/rustic-shrimp-toasts",
expected_slug="rustic-shrimp-toasts",
),
RecipeTestData(
url="https://www.allrecipes.com/recipe/282905/honey-garlic-shrimp/",
expected_slug="honey-garlic-shrimp",
),
]
raw_recipe = {
"name": "Banana Bread",
"description": "From Angie's mom",
"image": "banana-bread.jpg",
"recipeYield": "",
"recipeIngredient": [
"4 bananas",
"1/2 cup butter",
"1/2 cup sugar",
"2 eggs",
"2 cups flour",
"1/2 tsp baking soda",
"1 tsp baking powder",
"pinch salt",
"1/4 cup nuts (we like pecans)",
],
"recipeInstructions": [
{
"@type": "Beat the eggs, then cream with the butter and sugar",
"text": "Beat the eggs, then cream with the butter and sugar",
},
{
"@type": "Mix in bananas, then flour, baking soda/powder, salt, and nuts",
"text": "Mix in bananas, then flour, baking soda/powder, salt, and nuts",
},
{
"@type": "Add to greased and floured pan",
"text": "Add to greased and floured pan",
},
{
"@type": "Bake until brown/cracked, toothpick comes out clean",
"text": "Bake until brown/cracked, toothpick comes out clean",
},
],
"totalTime": "None",
"prepTime": None,
"performTime": None,
"slug": "",
"categories": [],
"tags": ["breakfast", " baking"],
"dateAdded": "2021-01-12",
"notes": [],
"rating": 0,
"orgURL": None,
"extras": {},
}
raw_recipe_no_image = {
"name": "Banana Bread No Image",
"description": "From Angie's mom",
"image": "",
"recipeYield": "",
"recipeIngredient": [
"4 bananas",
"1/2 cup butter",
"1/2 cup sugar",
"2 eggs",
"2 cups flour",
"1/2 tsp baking soda",
"1 tsp baking powder",
"pinch salt",
"1/4 cup nuts (we like pecans)",
],
"recipeInstructions": [
{
"@type": "Beat the eggs, then cream with the butter and sugar",
"text": "Beat the eggs, then cream with the butter and sugar",
},
{
"@type": "Mix in bananas, then flour, baking soda/powder, salt, and nuts",
"text": "Mix in bananas, then flour, baking soda/powder, salt, and nuts",
},
{
"@type": "Add to greased and floured pan",
"text": "Add to greased and floured pan",
},
{
"@type": "Bake until brown/cracked, toothpick comes out clean",
"text": "Bake until brown/cracked, toothpick comes out clean",
},
],
"totalTime": "None",
"prepTime": None,
"performTime": None,
"slug": "",
"categories": [],
"tags": ["breakfast", " baking"],
"dateAdded": "2021-01-12",
"notes": [],
"rating": 0,
"orgURL": None,
"extras": {},
}