From 273f4143626020321b6cf15f94ff0a5ec71d642d Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Fri, 3 Aug 2018 10:08:08 -0700 Subject: db: encode Header objects to str In python 3 with the use of Policy objects (other than the Compat32 object which maintains the previous (python 2.x and <=3.2) API) change the way headers work, and the old Header object is no longer used. This is rather convenient in that python now implements many of the rules required for sepcial header types, but it changes the API. This fixes that by encoding the Header objects to strings. Fixes #1289 --- tests/db/envelope_test.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'tests/db') 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. -- cgit v1.2.3