tests: use https:// scheme in webtest client (#71943)
Adaptation to change in authentic settings (SESSION_COOKIE_SECURE=True).
This commit is contained in:
parent
347f4d2bc6
commit
666ee5e9df
|
@ -24,7 +24,7 @@ def app(request, db, settings, tmpdir):
|
|||
wtm._patch_settings()
|
||||
request.addfinalizer(wtm._unpatch_settings)
|
||||
settings.MEDIA_DIR = str(tmpdir.mkdir('media'))
|
||||
return django_webtest.DjangoTestApp(extra_environ={'HTTP_HOST': 'localhost'})
|
||||
return django_webtest.DjangoTestApp(extra_environ={'HTTP_HOST': 'localhost', 'wsgi.url_scheme': 'https'})
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
|
|
|
@ -175,7 +175,7 @@ def test_liege_service_admin(app, base):
|
|||
'csrfmiddlewaretoken': app.cookies['csrftoken'],
|
||||
'action': 'add',
|
||||
'role': base.role_service_liege.pk
|
||||
})
|
||||
}, headers={'Referer': 'https://localhost'})
|
||||
|
||||
assert base.user_liege.roles.count() == 1
|
||||
assert base.user_liege.roles.get().name == 'Accès Service'
|
||||
|
|
Loading…
Reference in New Issue