mirror of
https://github.com/coddingtonbear/django-mailbox.git
synced 2026-07-09 22:38:19 +02:00
Fixing header decoding such that it works properly under both Python 3.x and 2.x.
This commit is contained in:
parent
ef42c319e9
commit
a2cf80ef99
4 changed files with 18 additions and 6 deletions
|
|
@ -191,7 +191,12 @@ class TestProcessEmail(EmailMessageTestCase):
|
|||
actual_subject = msg.subject
|
||||
self.assertEqual(actual_subject, expected_subject)
|
||||
|
||||
expected_from = six.u('test test<mr.test32@mail.ru>')
|
||||
if six.PY3:
|
||||
# There were various bugfixes in Py3k's email module,
|
||||
# this is apparently one of them.
|
||||
expected_from = six.u('test test <mr.test32@mail.ru>')
|
||||
else:
|
||||
expected_from = six.u('test test<mr.test32@mail.ru>')
|
||||
actual_from = msg.from_header
|
||||
|
||||
self.assertEqual(expected_from, actual_from)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue