1c94c1ae4e
* Fri Jul 20 2012 David Malcolm <dmalcolm@redhat.com> - 3.3.0-0.1.b1 - 3.2 -> 3.3: https://fedoraproject.org/wiki/Features/Python_3.3 - 3.3.0b1: refresh patches 3, 55, 102, 111, 113, 114, 134, 157; drop upstream patch 147; regenenerate autotools patch; drop "--with-wide-unicode" from configure (PEP 393); "plat-linux2" -> "plat-linux" (upstream issue 12326); "bz2" -> "_bz2" and "crypt" -> "_crypt"; egg-info files are no longer shipped for stdlib (upstream issues 10645 and 12218); email/test moved to test/test_email; add /usr/bin/pyvenv[-3.3] and venv module (PEP 405); add _decimal and _lzma modules; make collections modules explicit in payload again (upstream issue 11085); add _testbuffer module to tests subpackage (added in upstream commit 3f9b3b6f7ff0)
52 lines
2.1 KiB
Diff
52 lines
2.1 KiB
Diff
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
|
|
|
|
|
|
|
|
-# Test the basic MIMEAudio class
|
|
-class TestMIMEAudio(unittest.TestCase):
|
|
- def setUp(self):
|
|
- with openfile('audiotest.au', '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)
|
|
-
|
|
- 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)
|
|
-
|
|
-
|
|
-
|
|
# Test the basic MIMEImage class
|
|
class TestMIMEImage(unittest.TestCase):
|
|
def setUp(self):
|