diff options
Diffstat (limited to 'service/test/unit')
-rw-r--r-- | service/test/unit/adapter/mailstore/test_body_parser.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/service/test/unit/adapter/mailstore/test_body_parser.py b/service/test/unit/adapter/mailstore/test_body_parser.py index 9d58637c..155b326c 100644 --- a/service/test/unit/adapter/mailstore/test_body_parser.py +++ b/service/test/unit/adapter/mailstore/test_body_parser.py @@ -55,3 +55,9 @@ class BodyParserTest(unittest.TestCase): self.assertEqual(u'unkown char: ', parser.parsed_content()) logger_mock.warn.assert_called_with(u'Failed to encode content for charset iso-8859-1. Ignoring invalid chars: \'latin-1\' codec can\'t encode character u\'\\ufffd\' in position 13: ordinal not in range(256)') + + def test_charset_can_be_explicitely_set_and_take_precedence_over_content_type_if_set(self): + parser = BodyParser('YmzDoQ==\n', content_type='text/plain; us-ascii', content_transfer_encoding='base64', + charset="utf-8") + + self.assertEqual(u'bl\xe1', parser.parsed_content()) |