python3.11/python-3.2b2-remove-mimeaudio-tests.patch

58 lines
2.5 KiB
Diff
Raw Normal View History

diff -up Python-3.2b2/Lib/email/test/test_email.py.remove-mimeaudio-tests Python-3.2b2/Lib/email/test/test_email.py
--- Python-3.2b2/Lib/email/test/test_email.py.remove-mimeaudio-tests 2010-12-18 13:25:38.000000000 -0500
+++ Python-3.2b2/Lib/email/test/test_email.py 2010-12-28 16:50:34.910309105 -0500
@@ -977,53 +977,6 @@ Blah blah blah
2010-01-13 21:25:18 +00:00
-# Test the basic MIMEAudio class
-class TestMIMEAudio(unittest.TestCase):
- def setUp(self):
- # Make sure we pick up the audiotest.au that lives in email/test/data.
- # In Python, there's an audiotest.au living in Lib/test but that isn't
- # included in some binary distros that don't include the test
- # package. The trailing empty string on the .join() is significant
- # since findfile() will do a dirname().
- datadir = os.path.join(os.path.dirname(landmark), 'data', '')
- with open(findfile('audiotest.au', datadir), 'rb') as fp:
- 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):