summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--alot/db/attachment.py2
-rw-r--r--alot/db/utils.py2
-rw-r--r--tests/db/envelope_test.py2
3 files changed, 2 insertions, 4 deletions
diff --git a/alot/db/attachment.py b/alot/db/attachment.py
index ec0feaeb..2868ed66 100644
--- a/alot/db/attachment.py
+++ b/alot/db/attachment.py
@@ -89,5 +89,5 @@ class Attachment(object):
part['Content-Disposition'] = Header(
self.part['Content-Disposition'],
maxlinelen=78,
- header_name='Content-Disposition')
+ header_name='Content-Disposition').encode()
return part
diff --git a/alot/db/utils.py b/alot/db/utils.py
index e750bfbb..33330f72 100644
--- a/alot/db/utils.py
+++ b/alot/db/utils.py
@@ -531,7 +531,7 @@ def encode_header(key, value):
value = Header(', '.join(encodedentries))
else:
value = Header(value)
- return value
+ return value.encode()
def is_subdir_of(subpath, superpath):
diff --git a/tests/db/envelope_test.py b/tests/db/envelope_test.py
index de01eaf7..f14b8594 100644
--- a/tests/db/envelope_test.py
+++ b/tests/db/envelope_test.py
@@ -72,7 +72,6 @@ class TestEnvelope(unittest.TestCase):
actual = email.parser.Parser().parsestr(raw)
self.assertEmailEqual(mail, actual)
- @unittest.expectedFailure
@mock.patch('alot.db.envelope.settings', SETTINGS)
def test_construct_mail_simple(self):
"""Very simple envelope with a To, From, Subject, and body."""
@@ -85,7 +84,6 @@ class TestEnvelope(unittest.TestCase):
bodytext='Test')
self._test_mail(e)
- @unittest.expectedFailure
@mock.patch('alot.db.envelope.settings', SETTINGS)
def test_construct_mail_with_attachment(self):
"""Very simple envelope with a To, From, Subject, body and attachment.