mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-06 22:58:19 -05:00
rebase
This commit is contained in:
@@ -19,6 +19,23 @@ DATA_DIR = "cookbook/tests/other/test_data/"
|
||||
# plus the test that previously existed
|
||||
# plus the custom scraper that was created
|
||||
# plus any specific defects discovered along the way
|
||||
RECIPES = [
|
||||
ALLRECIPES,
|
||||
AMERICAS_TEST_KITCHEN,
|
||||
CHEF_KOCH,
|
||||
CHEF_KOCH2, # test for empty ingredient in ingredient_parser
|
||||
COOKPAD,
|
||||
COOKS_COUNTRY,
|
||||
DELISH,
|
||||
FOOD_NETWORK,
|
||||
GIALLOZAFFERANO,
|
||||
JOURNAL_DES_FEMMES,
|
||||
MADAME_DESSERT, # example of json only source
|
||||
MARMITON,
|
||||
TASTE_OF_HOME,
|
||||
THE_SPRUCE_EATS, # example of non-json recipes_scraper
|
||||
TUDOGOSTOSO,
|
||||
]
|
||||
|
||||
|
||||
@pytest.mark.parametrize("arg", [
|
||||
@@ -32,29 +49,7 @@ def test_import_permission(arg, request):
|
||||
assert c.get(reverse(IMPORT_SOURCE_URL)).status_code == arg[1]
|
||||
|
||||
|
||||
@pytest.mark.parametrize("arg", [
|
||||
ALLRECIPES,
|
||||
# test of custom scraper ATK
|
||||
AMERICAS_TEST_KITCHEN,
|
||||
CHEF_KOCH,
|
||||
# test for empty ingredient in ingredient_parser
|
||||
CHEF_KOCH2,
|
||||
COOKPAD,
|
||||
# test of custom scraper ATK
|
||||
COOKS_COUNTRY,
|
||||
DELISH,
|
||||
FOOD_NETWORK,
|
||||
GIALLOZAFFERANO,
|
||||
JOURNAL_DES_FEMMES,
|
||||
# example of recipes_scraper in with wildmode
|
||||
# example of json only source
|
||||
MADAME_DESSERT,
|
||||
MARMITON,
|
||||
TASTE_OF_HOME,
|
||||
# example of non-json recipes_scraper
|
||||
THE_SPRUCE_EATS, # TODO seems to be broken in recipe scrapers
|
||||
TUDOGOSTOSO,
|
||||
])
|
||||
@pytest.mark.parametrize("arg", RECIPES, ids=[x['file'][0] for x in RECIPES])
|
||||
def test_recipe_import(arg, u1_s1):
|
||||
url = arg['url']
|
||||
for f in list(arg['file']): # url and files get popped later
|
||||
|
||||
Reference in New Issue
Block a user