mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #34074 -- Used headers argument for RequestFactory and Client in docs and tests.
This commit is contained in:
committed by
Mariusz Felisiak
parent
0d3ccf7512
commit
99bd5fb4c2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user