diff options
| author | NavaL <ayoyo@thoughtworks.com> | 2016-10-21 21:11:22 +0200 | 
|---|---|---|
| committer | NavaL <ayoyo@thoughtworks.com> | 2016-10-21 21:11:22 +0200 | 
| commit | aaed875ecce770bde03a2066ade40944cd1ab31d (patch) | |
| tree | 8b1808dd803a1b45e1d3be394b97ac9010d9be96 /service/test/unit | |
| parent | 2dcdbc47e6232309329b4ec53f5daaab201d3d5b (diff) | |
[#797]  reinstating use of the provided email body charstet encoding
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())  | 
