Yves Dorfsman <[email protected]> added the comment:
encoders.py:
Fixes the issue of base64'ed being > 76 chars
test_email.py:
-test that base64'ed binary is split into 76 chars lines
-WARRNING: Changes the test for MIMEApplication.test_body:
-it changes the name of the variable 'bytes' to 'bytesdata'
-it strip()s the base64ed payload before it compares it to the expected
payload. With the change above (using encodebytes instead of b64encode in
encoders.py), this test, as is, fails, because there is an extra newline at the
end. Extra newlines are part of base64 and should not be an issue, as a matter
of fact, you obtain the original bytes when you decode, regardless of having
extra newlines. It would be good to know the intent of the original author of
this test. Was the intent to ensure there were no newline? If so, why? Or was
the intent to simply confirm the base64 encoding conform to the standard? If
the latter, my change should not be an issue.
All test ("make test") passed with this patch.
----------
Added file: http://bugs.python.org/file20755/issue9298-2.patch
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue9298>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com