WIP fixing path issues on diffrent systems

relative paths do not appear to work on windows or at least the setup i have
This commit is contained in:
vabene1111 2021-05-22 12:03:37 +02:00
parent 286118093c
commit 18333563f2

View File

@ -1,4 +1,6 @@
import json
import os
import pytest
from django.urls import reverse
@ -51,7 +53,8 @@ def test_import_permission(arg, request):
])
def test_recipe_import(arg, u1_s1):
for f in arg['file']:
with open(DATA_DIR + f, 'r', encoding='UTF-8') as d:
test_file = os.path.join(os.getenv('PYTEST_CURRENT_TEST').split('test_url_import.py')[0], 'test_data', f)
with open(test_file, 'r', encoding='UTF-8') as d:
response = u1_s1.post(
reverse(IMPORT_SOURCE_URL),
{