From 1e0595d39263d9f19d818c949d6e593e70303672 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Fri, 30 Jun 2017 11:00:38 +0200 Subject: Use stdlib functions in db.utils.encode_header Instead of manual parsing with regexp and manual string formatting the functions from email.utils are used. This fixes some small inconsistencies with addresses with empty realnames and with commas in realnames. --- tests/db/utils_test.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'tests/db') diff --git a/tests/db/utils_test.py b/tests/db/utils_test.py index 08e2d8a7..d07dd56a 100644 --- a/tests/db/utils_test.py +++ b/tests/db/utils_test.py @@ -176,7 +176,6 @@ class TestEncodeHeader(unittest.TestCase): expected = email.header.Header(address) self.assertEqual(actual, expected) - @unittest.expectedFailure def test_email_addresses_with_empty_realnames_are_treated_like_plain(self): address = 'user@example.com' empty_realname = '<'+address+'>' @@ -203,7 +202,6 @@ class TestEncodeHeader(unittest.TestCase): expected = email.header.Header(addresses) self.assertEqual(actual, expected) - @unittest.expectedFailure def test_comma_in_names_are_allowed(self): addresses = '"last, first" , ' \ '"name, other" ' -- cgit v1.2.3