django1/tests/mail
Carlton Gibson 1564e42ad3 Refs #30512, #15042 -- Added local-only address to sanitize_email() tests cases.
email.headerregistry.parser.get_mailbox() returns a token with a `token_type` attribute.

If `token_type` is `’invalid-mailbox’` then RFC violations have been detected. Emails with only the local part, and no domain,  are correctly parsed but are marked as `’invalid-mailbox’`.

As per #15042, local-only are supported, to enable sending to addresses on localhost.

sanitize_email() does not currently check `token_type`. This test is added to avoid a regression in case this is revisited in the future.
2019-06-13 17:29:58 +02:00
..
attachments Fixed #27848 -- Prevented crash when attaching a .eml file to a message 2017-04-01 16:19:03 +02:00
__init__.py Removed unneeded imports in tests's __init__.py and unified them. 2013-09-09 23:01:07 +02:00
custombackend.py Refs #23919 -- Replaced super(ClassName, self) with super(). 2017-01-25 12:23:46 -05:00
test_sendtestemail.py Refs #23919 -- Removed encoding preambles and future imports 2017-01-18 09:55:19 +01:00
tests.py Refs #30512, #15042 -- Added local-only address to sanitize_email() tests cases. 2019-06-13 17:29:58 +02:00