1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +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

@@ -419,14 +419,14 @@ class AdminEmailHandlerTest(SimpleTestCase):
# Text email
admin_email_handler.include_html = False
try:
self.client.get("/", HTTP_HOST="evil.com")
self.client.get("/", headers={"host": "evil.com"})
finally:
admin_email_handler.include_html = old_include_html
# HTML email
admin_email_handler.include_html = True
try:
self.client.get("/", HTTP_HOST="evil.com")
self.client.get("/", headers={"host": "evil.com"})
finally:
admin_email_handler.include_html = old_include_html