Fix UnicodeDecodeErrors when sending e-mails with utf-8 contents.
Review Request #7553 — Created July 28, 2015 and submitted — Latest diff uploaded
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.