(self)
| 1635 | self.assertEqual(au.get_content_type(), 'audio/fish') |
| 1636 | |
| 1637 | def test_add_header(self): |
| 1638 | self._make_audio('au') |
| 1639 | eq = self.assertEqual |
| 1640 | self._au.add_header('Content-Disposition', 'attachment', |
| 1641 | filename='sndhdr.au') |
| 1642 | eq(self._au['content-disposition'], |
| 1643 | 'attachment; filename="sndhdr.au"') |
| 1644 | eq(self._au.get_params(header='content-disposition'), |
| 1645 | [('attachment', ''), ('filename', 'sndhdr.au')]) |
| 1646 | eq(self._au.get_param('filename', header='content-disposition'), |
| 1647 | 'sndhdr.au') |
| 1648 | missing = [] |
| 1649 | eq(self._au.get_param('attachment', header='content-disposition'), '') |
| 1650 | self.assertIs(self._au.get_param( |
| 1651 | 'foo', failobj=missing, |
| 1652 | header='content-disposition'), missing) |
| 1653 | # Try some missing stuff |
| 1654 | self.assertIs(self._au.get_param('foobar', missing), missing) |
| 1655 | self.assertIs(self._au.get_param('attachment', missing, |
| 1656 | header='foobar'), missing) |
| 1657 | |
| 1658 | |
| 1659 |
nothing calls this directly
no test coverage detected