(self)
| 1613 | self.assertEqual(au.get_content_type(), 'audio/fish') |
| 1614 | |
| 1615 | def test_add_header(self): |
| 1616 | self._make_audio('au') |
| 1617 | eq = self.assertEqual |
| 1618 | self._au.add_header('Content-Disposition', 'attachment', |
| 1619 | filename='sndhdr.au') |
| 1620 | eq(self._au['content-disposition'], |
| 1621 | 'attachment; filename="sndhdr.au"') |
| 1622 | eq(self._au.get_params(header='content-disposition'), |
| 1623 | [('attachment', ''), ('filename', 'sndhdr.au')]) |
| 1624 | eq(self._au.get_param('filename', header='content-disposition'), |
| 1625 | 'sndhdr.au') |
| 1626 | missing = [] |
| 1627 | eq(self._au.get_param('attachment', header='content-disposition'), '') |
| 1628 | self.assertIs(self._au.get_param( |
| 1629 | 'foo', failobj=missing, |
| 1630 | header='content-disposition'), missing) |
| 1631 | # Try some missing stuff |
| 1632 | self.assertIs(self._au.get_param('foobar', missing), missing) |
| 1633 | self.assertIs(self._au.get_param('attachment', missing, |
| 1634 | header='foobar'), missing) |
| 1635 | |
| 1636 | |
| 1637 |
nothing calls this directly
no test coverage detected