diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2017-07-24 16:35:33 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2017-07-24 16:41:08 -0700 |
commit | 9133904bd7d376e18a0e3ce36de4438814893cbc (patch) | |
tree | 123bb573c7b2c94be3d31de45b93e20717662cb4 /tests/db | |
parent | 141b0f8ac30df980b27f441a7f923fb7e6d13efe (diff) |
tests/db/utils: Add tests for unicode as uids
One of these tests is known to fail, and marked as xfail.
Diffstat (limited to 'tests/db')
-rw-r--r-- | tests/db/utils_test.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/db/utils_test.py b/tests/db/utils_test.py index 59fd361f..11b54a1d 100644 --- a/tests/db/utils_test.py +++ b/tests/db/utils_test.py @@ -369,3 +369,15 @@ class TestAddSignatureHeaders(unittest.TestCase): self.assertIn((utils.X_SIGNATURE_VALID_HEADER, u'True'), mail.headers) self.assertIn( (utils.X_SIGNATURE_MESSAGE_HEADER, u'Untrusted: mocked'), mail.headers) + + @unittest.expectedFailure + def test_unicode_as_bytes(self): + mail = self.FakeMail() + key = make_key() + key.uids = [make_uid('andreá@example.com', + uid=u'Andreá'.encode('utf-8'))] + mail = self.check(key, True) + + self.assertIn((utils.X_SIGNATURE_VALID_HEADER, u'True'), mail.headers) + self.assertIn( + (utils.X_SIGNATURE_MESSAGE_HEADER, u'Valid: Andreá'), mail.headers) |