python3.11/00003-remove-mimeaudio-tests.patch

52 lines
2.1 KiB
Diff
Raw Normal View History

diff -up Python-3.3.0b1/Lib/test/test_email/test_email.py.remove-mimeaudio-tests Python-3.3.0b1/Lib/test/test_email/test_email.py
--- Python-3.3.0b1/Lib/test/test_email/test_email.py.remove-mimeaudio-tests 2012-06-26 16:19:47.000000000 -0400
+++ Python-3.3.0b1/Lib/test/test_email/test_email.py 2012-07-20 12:04:45.316472136 -0400
@@ -1285,47 +1285,6 @@ Blah blah blah
2010-01-13 21:25:18 +00:00
-# Test the basic MIMEAudio class
-class TestMIMEAudio(unittest.TestCase):
- def setUp(self):
- with openfile('audiotest.au', 'rb') as fp:
2010-01-13 21:25:18 +00:00
- self._audiodata = fp.read()
- self._au = MIMEAudio(self._audiodata)
-
- def test_guess_minor_type(self):
- self.assertEqual(self._au.get_content_type(), 'audio/basic')
-
- def test_encoding(self):
- payload = self._au.get_payload()
- self.assertEqual(base64.decodebytes(bytes(payload, 'ascii')),
- self._audiodata)
2010-01-13 21:25:18 +00:00
-
- def test_checkSetMinor(self):
- au = MIMEAudio(self._audiodata, 'fish')
- self.assertEqual(au.get_content_type(), 'audio/fish')
-
- def test_add_header(self):
- eq = self.assertEqual
- unless = self.assertTrue
- self._au.add_header('Content-Disposition', 'attachment',
- filename='audiotest.au')
- eq(self._au['content-disposition'],
- 'attachment; filename="audiotest.au"')
- eq(self._au.get_params(header='content-disposition'),
- [('attachment', ''), ('filename', 'audiotest.au')])
- eq(self._au.get_param('filename', header='content-disposition'),
- 'audiotest.au')
- missing = []
- eq(self._au.get_param('attachment', header='content-disposition'), '')
- unless(self._au.get_param('foo', failobj=missing,
- header='content-disposition') is missing)
- # Try some missing stuff
- unless(self._au.get_param('foobar', missing) is missing)
- unless(self._au.get_param('attachment', missing,
- header='foobar') is missing)
-
-
-
2010-01-13 21:25:18 +00:00
# Test the basic MIMEImage class
class TestMIMEImage(unittest.TestCase):
def setUp(self):