We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 09cd7f1 commit ac8e652Copy full SHA for ac8e652
Lib/test/test_email/test_email.py
@@ -1563,6 +1563,18 @@ def test_add_header(self):
1563
self.assertIs(self._au.get_param('attachment', missing,
1564
header='foobar'), missing)
1565
1566
+ def test_infer_audio_content_subtypes(self):
1567
+ data_to_subtype = {
1568
+ b'FORM AIFC' : 'x-aiff',
1569
+ b'FORM AIFF' : 'x-aiff',
1570
+ b'.snd' : 'basic',
1571
+ b'.snd1orem1ps' : 'basic', # the chars after '.snd' don't matter.
1572
+ b'RIFF WAVEfmt ': 'x-wav', # trailing space is intentional.
1573
+ }
1574
+
1575
+ for audiodata, subtype in data_to_subtype.items():
1576
+ au = MIMEAudio(audiodata)
1577
+ self.assertEqual(au.get_content_subtype(), subtype)
1578
1579
1580
# Test the basic MIMEImage class
0 commit comments