diff options
author | David Wobrock <david.wobrock@gmail.com> | 2022-12-24 00:10:25 +0100 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-01-04 09:11:36 +0100 |
commit | 99bd5fb4c2d51f7bf8a19b2c12a603ab38b85ec9 (patch) | |
tree | 72023829a9296a0ae457523fe6f223525be6a576 /tests/auth_tests | |
parent | 0d3ccf7512edd48ac2461b7140977c16ee479d3e (diff) | |
download | django-99bd5fb4c2d51f7bf8a19b2c12a603ab38b85ec9.tar.gz |
Refs #34074 -- Used headers argument for RequestFactory and Client in docs and tests.
Diffstat (limited to 'tests/auth_tests')
-rw-r--r-- | tests/auth_tests/test_views.py | 4 |
1 files changed, 2 insertions, 2 deletions
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) |