-
-
reviewboard/notifications/tests.py (Diff revision 1) Col: 80 E501 line too long (80 > 79 characters)
-
reviewboard/notifications/tests.py (Diff revision 1) Col: 80 E501 line too long (81 > 79 characters)
Fix UnicodeDecodeErrors when sending e-mails with utf-8 contents.
Review Request #7553 — Created July 28, 2015 and submitted
When a review request e-mail had utf-8 in the body, it would fail to send
because of a UnicodeDecodeError while assembling the data that gets sent to the
server. The fix is a pretty trivial addition of some.encode()
calls.We hadn't caught this before because the test backend for e-mail in django
doesn't run through the same sort of internal processing as other backends do.
I've changed an existing test case and added a new one so that we use the
console e-mail backend while running the unicode tests, so that we exercise the
same machinery.
Ran unit tests. Before the encode changes, they failed. After, they succeed.
Change Summary:
pep8
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+47 -19) |
-
Tool: Pyflakes Processed Files: reviewboard/notifications/email.py reviewboard/notifications/tests.py Tool: PEP8 Style Checker Processed Files: reviewboard/notifications/email.py reviewboard/notifications/tests.py
-
-
reviewboard/notifications/tests.py (Diff revision 2) Would this maybe be a useful thing to turn into a context manager that other future tests could use?
Change Summary:
Implement settings change as a context manager.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+51 -19) |