tests: don't distinguish unicode data sources in py3 (#36515)

This commit is contained in:
Frédéric Péters 2019-11-16 15:31:25 +01:00
parent 228053c9ce
commit 762560fcaf
1 changed files with 5 additions and 1 deletions

View File

@ -21,6 +21,7 @@ import pytest
from webtest import Upload
import mock
from django.utils import six
from django.utils.six import StringIO, BytesIO
from django.utils.six.moves.urllib import parse as urlparse
@ -4812,7 +4813,10 @@ def test_data_sources_view(pub):
data_source.store()
resp = app.get('/backoffice/settings/data-sources/%s/' % data_source.id)
assert 'Preview' in resp.text
assert 'error: not a string' in resp.text
if six.PY2:
assert 'error: not a string' in resp.text
else:
assert 'Domicilié' in resp.text
# check json
json_file_path = os.path.join(pub.app_dir, 'test.json')