churchyard / rpms / python3

Forked from rpms/python3 3 years ago
Clone

Blame 00003-remove-mimeaudio-tests.patch

92d712a
diff -up Python-3.3.0rc1/Lib/test/test_email/test_email.py.remove-mimeaudio-tests Python-3.3.0rc1/Lib/test/test_email/test_email.py
92d712a
--- Python-3.3.0rc1/Lib/test/test_email/test_email.py.remove-mimeaudio-tests	2012-08-25 15:22:10.000000000 -0400
92d712a
+++ Python-3.3.0rc1/Lib/test/test_email/test_email.py	2012-08-27 11:00:11.936964586 -0400
92d712a
@@ -1321,47 +1321,6 @@ Blah blah blah
92d712a
         self.assertEqual(b.getvalue(), source + b'>From R\xc3\xb6lli\n')
a3483f9
 
a3483f9
 
a3483f9
-# Test the basic MIMEAudio class
a3483f9
-class TestMIMEAudio(unittest.TestCase):
a3483f9
-    def setUp(self):
1c94c1a
-        with openfile('audiotest.au', '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):