mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Refs #34118 -- Improved sanitize_address() error message for tuple with empty strings.
This commit is contained in:
@@ -1084,9 +1084,10 @@ class MailTests(HeadersCheckMixin, SimpleTestCase):
|
||||
"@",
|
||||
"to@",
|
||||
"@example.com",
|
||||
("", ""),
|
||||
):
|
||||
with self.subTest(email_address=email_address):
|
||||
with self.assertRaises(ValueError):
|
||||
with self.assertRaisesMessage(ValueError, "Invalid address"):
|
||||
sanitize_address(email_address, encoding="utf-8")
|
||||
|
||||
def test_sanitize_address_header_injection(self):
|
||||
|
||||
Reference in New Issue
Block a user