Commits

Barry Warsaw committed 5f33120

Fix the tests to work with Python 2.1, which email 2.5 must do.

Comments (0)

Files changed (1)

Lib/email/test/test_email.py

 import unittest
 import warnings
 from cStringIO import StringIO
-from types import StringType, ListType
+from types import StringType, ListType, TupleType
 
 import email
 
 '''
         msg = email.message_from_string(m)
         param = msg.get_param('NAME')
-        self.failIf(isinstance(param, tuple))
+        self.failIf(isinstance(param, TupleType))
         self.assertEqual(
             param,
             'file____C__DOCUMENTS_20AND_20SETTINGS_FABIEN_LOCAL_20SETTINGS_TEMP_nsmail.htm')
 """
         msg = email.message_from_string(m)
         param = msg.get_param('name')
-        self.failIf(isinstance(param, tuple))
+        self.failIf(isinstance(param, TupleType))
         self.assertEqual(param, "Frank's Document")
 
     def test_rfc2231_tick_attack_extended(self):
 """
         msg = email.message_from_string(m)
         param = msg.get_param('name')
-        self.failIf(isinstance(param, tuple))
+        self.failIf(isinstance(param, TupleType))
         self.assertEqual(param, "us-ascii'en-us'Frank's Document")
 
     def test_rfc2231_no_extended_values(self):