4teamwork/opengever.core — pull request #433 by lukasgraf (2014-07-29 17:07:45+00:00)
Title: Fix UnicodeError in resolving mail author (if author not an OGDS user).

If the author of a mail can't be found in OGDS, the [`get_author_by_email()`](https://github.com/4teamwork/opengever.core/blob/828650363271eec457e1ce8ab9d8dab8df5475d2/opengever/mail/mail.py#L122) function incorrectly returned a bytestring instead of unicode.

This wasn't caught by any tests because only the `To:` header of the test mail contained non-ASCII characters, but not the `From:`. Therefore I mainly updated the test:

- Use different names for OGDS user, From: header and To: header.
- Make sure both From: and To: contain non-ASCII characters
- Assert on actual values instead of using the same function the code to
be tested uses.