From 99bd5fb4c2d51f7bf8a19b2c12a603ab38b85ec9 Mon Sep 17 00:00:00 2001 From: David Wobrock Date: Sat, 24 Dec 2022 00:10:25 +0100 Subject: Refs #34074 -- Used headers argument for RequestFactory and Client in docs and tests. --- tests/auth_tests/test_views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auth_tests') diff --git a/tests/auth_tests/test_views.py b/tests/auth_tests/test_views.py index 5ea536151e..87022fd290 100644 --- a/tests/auth_tests/test_views.py +++ b/tests/auth_tests/test_views.py @@ -214,7 +214,7 @@ class PasswordResetTest(AuthViewsTestCase): response = self.client.post( "/password_reset/", {"email": "staffmember@example.com"}, - HTTP_HOST="www.example:dr.frankenstein@evil.tld", + headers={"host": "www.example:dr.frankenstein@evil.tld"}, ) self.assertEqual(response.status_code, 400) self.assertEqual(len(mail.outbox), 0) @@ -227,7 +227,7 @@ class PasswordResetTest(AuthViewsTestCase): response = self.client.post( "/admin_password_reset/", {"email": "staffmember@example.com"}, - HTTP_HOST="www.example:dr.frankenstein@evil.tld", + headers={"host": "www.example:dr.frankenstein@evil.tld"}, ) self.assertEqual(response.status_code, 400) self.assertEqual(len(mail.outbox), 0) -- cgit v1.3