diff options
author | Barry Warsaw <barry@python.org> | 2003-03-07 22:45:55 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2003-03-07 22:45:55 (GMT) |
commit | 21fcc4e28776921176ef971ace4fc93008e98c1f (patch) | |
tree | 97c6b61633878cb9aa92943f77ecaf0576384c06 /Lib/email/test | |
parent | 61cd0db3d2d3f78c85ba7c1ee52b5df63837a8ba (diff) | |
download | cpython-21fcc4e28776921176ef971ace4fc93008e98c1f.zip cpython-21fcc4e28776921176ef971ace4fc93008e98c1f.tar.gz cpython-21fcc4e28776921176ef971ace4fc93008e98c1f.tar.bz2 |
test_rfc2231_no_language_or_charset(): RFC 2231 allows leaving out
both the charset and language without including any single quotes.
Diffstat (limited to 'Lib/email/test')
-rw-r--r-- | Lib/email/test/test_email.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py index ff0caa3..5a3838c 100644 --- a/Lib/email/test/test_email.py +++ b/Lib/email/test/test_email.py @@ -2546,6 +2546,17 @@ Do you like this message? msg = self._msgobj('msg_32.txt') eq(msg.get_content_charset(), 'us-ascii') + def test_rfc2231_no_language_or_charset(self): + m = '''\ +Content-Transfer-Encoding: 8bit +Content-Disposition: inline; filename="file____C__DOCUMENTS_20AND_20SETTINGS_FABIEN_LOCAL_20SETTINGS_TEMP_nsmail.htm" +Content-Type: text/html; NAME*0=file____C__DOCUMENTS_20AND_20SETTINGS_FABIEN_LOCAL_20SETTINGS_TEM; NAME*1=P_nsmail.htm + +''' + msg = email.message_from_string(m) + self.assertEqual(msg.get_param('NAME'), + (None, None, 'file____C__DOCUMENTS_20AND_20SETTINGS_FABIEN_LOCAL_20SETTINGS_TEMP_nsmail.htm')) + def _testclasses(): |