churchyard / rpms / python3

Forked from rpms/python3 6 years ago
Clone

Blame python-3.2b2-remove-mimeaudio-tests.patch

5080ffc
diff -up Python-3.2b2/Lib/email/test/test_email.py.remove-mimeaudio-tests Python-3.2b2/Lib/email/test/test_email.py
5080ffc
--- Python-3.2b2/Lib/email/test/test_email.py.remove-mimeaudio-tests	2010-12-18 13:25:38.000000000 -0500
5080ffc
+++ Python-3.2b2/Lib/email/test/test_email.py	2010-12-28 16:50:34.910309105 -0500
5080ffc
@@ -977,53 +977,6 @@ Blah blah blah
5080ffc
 
a3483f9
 
a3483f9
 
a3483f9
-# Test the basic MIMEAudio class
a3483f9
-class TestMIMEAudio(unittest.TestCase):
a3483f9
-    def setUp(self):
a3483f9
-        # Make sure we pick up the audiotest.au that lives in email/test/data.
a3483f9
-        # In Python, there's an audiotest.au living in Lib/test but that isn't
a3483f9
-        # included in some binary distros that don't include the test
a3483f9
-        # package.  The trailing empty string on the .join() is significant
a3483f9
-        # since findfile() will do a dirname().
a3483f9
-        datadir = os.path.join(os.path.dirname(landmark), 'data', '')
a3483f9
-        with open(findfile('audiotest.au', datadir), 'rb') as fp:
a3483f9
-            self._audiodata = fp.read()
a3483f9
-        self._au = MIMEAudio(self._audiodata)
a3483f9
-
a3483f9
-    def test_guess_minor_type(self):
a3483f9
-        self.assertEqual(self._au.get_content_type(), 'audio/basic')
a3483f9
-
a3483f9
-    def test_encoding(self):
a3483f9
-        payload = self._au.get_payload()
7eb10c8
-        self.assertEqual(base64.decodebytes(bytes(payload, 'ascii')),
7eb10c8
-                self._audiodata)
a3483f9
-
a3483f9
-    def test_checkSetMinor(self):
a3483f9
-        au = MIMEAudio(self._audiodata, 'fish')
a3483f9
-        self.assertEqual(au.get_content_type(), 'audio/fish')
a3483f9
-
a3483f9
-    def test_add_header(self):
a3483f9
-        eq = self.assertEqual
a3483f9
-        unless = self.assertTrue
a3483f9
-        self._au.add_header('Content-Disposition', 'attachment',
a3483f9
-                            filename='audiotest.au')
a3483f9
-        eq(self._au['content-disposition'],
a3483f9
-           'attachment; filename="audiotest.au"')
a3483f9
-        eq(self._au.get_params(header='content-disposition'),
a3483f9
-           [('attachment', ''), ('filename', 'audiotest.au')])
a3483f9
-        eq(self._au.get_param('filename', header='content-disposition'),
a3483f9
-           'audiotest.au')
a3483f9
-        missing = []
a3483f9
-        eq(self._au.get_param('attachment', header='content-disposition'), '')
a3483f9
-        unless(self._au.get_param('foo', failobj=missing,
a3483f9
-                                  header='content-disposition') is missing)
a3483f9
-        # Try some missing stuff
a3483f9
-        unless(self._au.get_param('foobar', missing) is missing)
a3483f9
-        unless(self._au.get_param('attachment', missing,
a3483f9
-                                  header='foobar') is missing)
a3483f9
-
a3483f9
-
5080ffc
-
a3483f9
 # Test the basic MIMEImage class
a3483f9
 class TestMIMEImage(unittest.TestCase):
a3483f9
     def setUp(self):