Closed aliceh75 closed 6 years ago
If it is of any interest, this is what the email body looks like when I run the tests:
b'Content-Type: text/plain; charset="utf-8"\nMIME-Version: 1.0\nContent-Transfer-Encoding: base64\nReturn-Path:\nDelivered-To: \nMessage-ID: <93f411d1-1b1a-11e8-9014-a088b429b1dc@mockimap>\nDate: Mon, 26 Feb 2018 17:29:20 +0000\nFrom: \nUser-Agent: python3\nMIME-Version: 1.0\nTo: user\nSubject: =?utf-8?q?hello?=\n\ncGxlYXNlZCB0byBtZWV0IHlvdSwgd29udCB5b3UgZ3Vlc3MgbXkgbmFtZSA/\n'
The test
TestAioimaplib.test_fetch
relies on the generated email body being 360 bytes. When I run the tests locally (x86_64, Ubuntu 16.04, Python 3.5) the generated body is 378 bytes.I don't know where the extra bytes come from - but the generated email looks correct to me. Given that it's not the purpose of
test_fetch
to check how the email body is generated I've updated the test so it doesn't rely on knowing the body's length.