[Python-checkins] python/dist/src/Lib/email/test test_email.py,1.35,1.36

bwarsaw@users.sourceforge.net bwarsaw@users.sourceforge.net
Fri, 07 Mar 2003 14:45:58 -0800


Update of /cvsroot/python/python/dist/src/Lib/email/test
In directory sc8-pr-cvs1:/tmp/cvs-serv27382

Modified Files:
	test_email.py 
Log Message:
test_rfc2231_no_language_or_charset(): RFC 2231 allows leaving out
both the charset and language without including any single quotes.


Index: test_email.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/test/test_email.py,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** test_email.py	7 Mar 2003 15:58:51 -0000	1.35
--- test_email.py	7 Mar 2003 22:45:55 -0000	1.36
***************
*** 2547,2550 ****
--- 2547,2561 ----
          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'))
+