1
0
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:
David Wobrock
2022-12-24 00:10:25 +01:00
committed by Mariusz Felisiak
parent 0d3ccf7512
commit 99bd5fb4c2
14 changed files with 113 additions and 74 deletions

View File

@@ -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)