commit36403ecbae
Author: smilerz <smilerz@gmail.com> Date: Fri Sep 1 12:04:04 2023 -0500 update migration for new Automation Types commit4620ebaf30
Author: smilerz <smilerz@gmail.com> Date: Fri Sep 1 07:49:10 2023 -0500 add Name and Instruction automation to YouTube importer commitc907da84c1
Author: smilerz <smilerz@gmail.com> Date: Fri Sep 1 07:45:32 2023 -0500 remove old commented automation code commit9b5e39415e
Author: smilerz <smilerz@gmail.com> Date: Fri Sep 1 07:37:36 2023 -0500 test for automations applied during url import renamed TITLE_REPLACE to NAME_REPLACE commit2679a22464
Author: smilerz <smilerz@gmail.com> Date: Thu Aug 31 15:29:59 2023 -0500 added tests for regex_replace commit8bae21025b
Author: smilerz <smilerz@gmail.com> Date: Thu Aug 31 13:51:46 2023 -0500 updated Automation Modal and translations commit4120adc546
Author: smilerz <smilerz@gmail.com> Date: Thu Aug 31 13:12:41 2023 -0500 applied regex_replace automation to food and unit automations updated automation documentation commit30c891abfc
Author: smilerz <smilerz@gmail.com> Date: Thu Aug 31 12:46:34 2023 -0500 migrate regex_replace functions to AutomationEngine create TITLE_REPLACE, UNIT_REPLACE and FOOD REPLACE automation types create migration for new types commitb8317c2c29
Author: smilerz <smilerz@gmail.com> Date: Wed Aug 30 20:44:40 2023 -0500 move transpose words to AutomationEngine create tests for transpose words commit39253cfd02
Author: smilerz <smilerz@gmail.com> Date: Wed Aug 30 17:03:29 2023 -0500 refactor never_unit automation to AutomationEngine create tests for never_unit commit7c0b8b151c
Author: smilerz <smilerz@gmail.com> Date: Wed Aug 30 11:21:06 2023 -0500 update ingredient parser to use AutomationEngine for unt, keyword, food update test_ingredient_parser tests to accomodate changes commit8e1b8923af
Author: smilerz <smilerz@gmail.com> Date: Mon Aug 28 16:44:35 2023 -0500 keyword and unit Automtations refactored to Automation Engine keyword and unit automation tests added commit52eb876a08
Author: smilerz <smilerz@gmail.com> Date: Mon Aug 28 15:03:19 2023 -0500 food_alias tests added commita820b9c09e
Author: smilerz <smilerz@gmail.com> Date: Sat Aug 26 12:37:16 2023 -0500 create AutomationEngine class create food_automation method refactor food automations to use AutomationEngine
25 lines
706 B
Python
25 lines
706 B
Python
import pytest
|
|
from django.contrib import auth
|
|
from django.urls import reverse
|
|
|
|
from cookbook.forms import ImportExportBase
|
|
from cookbook.models import ExportLog
|
|
|
|
|
|
@pytest.fixture
|
|
def obj_1(space_1, u1_s1):
|
|
return ExportLog.objects.create(type=ImportExportBase.DEFAULT, running=False, created_by=auth.get_user(u1_s1), space=space_1, exported_recipes=10, total_recipes=10)
|
|
|
|
|
|
@pytest.mark.parametrize("arg", [
|
|
['a_u', 302],
|
|
['g1_s1', 302],
|
|
['u1_s1', 200],
|
|
['a1_s1', 200],
|
|
['u1_s2', 404],
|
|
['a1_s2', 404],
|
|
])
|
|
def test_export_file_cache(arg, request, obj_1):
|
|
c = request.getfixturevalue(arg[0])
|
|
assert c.get(reverse('view_export_file', args=[obj_1.pk])).status_code == arg[1]
|