From 5e5ebf696121926fbd03d5080f7e6fcdb39e0505 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Thu, 1 Dec 2022 19:11:05 +0100 Subject: [PATCH] tests: use https:// scheme in webtest client (#71945) Adaptation to change in authentic settings (SESSION_COOKIE_SECURE=True). --- tests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 5780545..b5153f9 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -18,7 +18,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'}) class AllHook: -- 2.37.2