summaryrefslogtreecommitdiff
path: root/tests/db
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2017-07-14 15:14:40 -0700
committerDylan Baker <dylan@pnwbakers.com>2017-07-24 16:41:42 -0700
commit55f7d0dbf14c63754b61c5986e857f1f30bf1ba9 (patch)
tree7a55b6320e92f5fe1cf5dee7df8a7c8b81821d58 /tests/db
parent9133904bd7d376e18a0e3ce36de4438814893cbc (diff)
db/utils: Support unicode in signatures
Currently if a signature name has a non-ascii unicode character in it, the thread will fail to load because a UnicodeEncodeError. This patch fixes that by converting the str into unicode.
Diffstat (limited to 'tests/db')
-rw-r--r--tests/db/utils_test.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/db/utils_test.py b/tests/db/utils_test.py
index 11b54a1d..48daef30 100644
--- a/tests/db/utils_test.py
+++ b/tests/db/utils_test.py
@@ -342,7 +342,7 @@ class TestAddSignatureHeaders(unittest.TestCase):
mock.Mock(return_value=key)), \
mock.patch('alot.db.utils.crypto.check_uid_validity',
mock.Mock(return_value=valid)):
- utils.add_signature_headers(mail, [mock.Mock(fpr=None)], u'')
+ utils.add_signature_headers(mail, [mock.Mock(fpr='')], u'')
return mail
@@ -370,7 +370,6 @@ class TestAddSignatureHeaders(unittest.TestCase):
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()