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:
parent
286118093c
commit
18333563f2
@ -1,4 +1,6 @@
|
|||||||
import json
|
import json
|
||||||
|
import os
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
@ -51,7 +53,8 @@ def test_import_permission(arg, request):
|
|||||||
])
|
])
|
||||||
def test_recipe_import(arg, u1_s1):
|
def test_recipe_import(arg, u1_s1):
|
||||||
for f in arg['file']:
|
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(
|
response = u1_s1.post(
|
||||||
reverse(IMPORT_SOURCE_URL),
|
reverse(IMPORT_SOURCE_URL),
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user