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
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user