tests: use https:// scheme in webtest client (#71948)

Adaptation to change in authentic settings (SESSION_COOKIE_SECURE=True).
This commit is contained in:
Benjamin Dauvergne 2022-12-01 19:18:28 +01:00
parent 359ecaacef
commit 1ac0726f82
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ def app(request, db, settings, tmpdir):
request.addfinalizer(wtm._unpatch_settings)
settings.MEDIA_DIR = str(tmpdir.mkdir('media'))
call_command('loaddata', 'cut_attributes.json')
return django_webtest.DjangoTestApp(extra_environ={'HTTP_HOST': 'localhost'})
return django_webtest.DjangoTestApp(extra_environ={'HTTP_HOST': 'localhost', 'wsgi.url_scheme': 'https'})
@pytest.fixture