Exemple #1
0
def test_dont_mangle_from_in_body():
    """Make sure that EmailMessage doesn't mangle 'From' in message body."""
    email = EmailMessage(
        'Subject', 'From the future', '*****@*****.**',
        '*****@*****.**', headers={'From': '*****@*****.**'})
    str_email = email.as_bytes()
    print(str_email)
    assert b'>From the future' not in str_email
Exemple #2
0
def test_dont_mangle_from_in_body():
    """Make sure that EmailMessage doesn't mangle 'From' in message body."""
    email = EmailMessage('Subject',
                         'From the future',
                         '*****@*****.**',
                         '*****@*****.**',
                         headers={'From': '*****@*****.**'})
    str_email = email.as_bytes()
    print(str_email)
    assert b'>From the future' not in str_email