]> git.ipfire.org Git - thirdparty/patchwork.git/commit
parser tests: test parsing of interesting mail
authorDaniel Axtens <dja@axtens.net>
Tue, 20 Sep 2016 08:29:06 +0000 (18:29 +1000)
committerStephen Finucane <stephen@that.guru>
Fri, 7 Oct 2016 18:39:47 +0000 (19:39 +0100)
commit9f7d11eeb728ed3eb5b542d00082db3be0e9a67f
treee0299e877b1d8b86d9f7e70c8d83140dc528b9a6
parent87bd088b3ed1ce6d7cd26ea7f30b3c19c5199181
parser tests: test parsing of interesting mail

We have 4 new tests:
 - One with a header with a character that is neither 7-bit ASCII
   nor UTF-8.
 - One with UTF-8 in the body.
 - One with un-encoded UTF-8 in the headers.
 - One with a header that claims to be UTF-8 but isn't.

This also requires us to change how we open files on Python 3. Use
the binary file and message_from_binary_file setup under Python 3.

Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Stephen Finucane <stephen@that.guru>
patchwork/tests/mail/0012-invalid-header-char.mbox [new file with mode: 0644]
patchwork/tests/mail/0013-with-utf8-body.mbox [new file with mode: 0644]
patchwork/tests/mail/0014-with-unencoded-utf8-headers.mbox [new file with mode: 0644]
patchwork/tests/mail/0015-with-invalid-utf8-headers.mbox [new file with mode: 0644]
patchwork/tests/test_parser.py