fixed recipe tests paths and edit max switch

This commit is contained in:
vabene1111
2021-05-30 09:27:20 +02:00
parent 14ca61b11f
commit 505b60cb14
3 changed files with 7 additions and 3 deletions

View File

@@ -55,7 +55,10 @@ def test_import_permission(arg, request):
])
def test_recipe_import(arg, u1_s1):
for f in arg['file']:
test_file = os.path.join(os.getcwd(), 'cookbook', 'tests', 'other', 'test_data', f)
if 'cookbook' in os.getcwd():
test_file = os.path.join(os.getcwd(), 'other', 'test_data', f)
else:
test_file = os.path.join(os.getcwd(), 'cookbook', 'tests', 'other', 'test_data', f)
with open(test_file, 'r', encoding='UTF-8') as d:
response = u1_s1.post(
reverse(IMPORT_SOURCE_URL),