(self)
| 1674 | self.assertEqual(im.get_content_type(), 'image/fish') |
| 1675 | |
| 1676 | def test_add_header(self): |
| 1677 | self._make_image('gif') |
| 1678 | eq = self.assertEqual |
| 1679 | self._im.add_header('Content-Disposition', 'attachment', |
| 1680 | filename='dingusfish.gif') |
| 1681 | eq(self._im['content-disposition'], |
| 1682 | 'attachment; filename="dingusfish.gif"') |
| 1683 | eq(self._im.get_params(header='content-disposition'), |
| 1684 | [('attachment', ''), ('filename', 'dingusfish.gif')]) |
| 1685 | eq(self._im.get_param('filename', header='content-disposition'), |
| 1686 | 'dingusfish.gif') |
| 1687 | missing = [] |
| 1688 | eq(self._im.get_param('attachment', header='content-disposition'), '') |
| 1689 | self.assertIs(self._im.get_param('foo', failobj=missing, |
| 1690 | header='content-disposition'), missing) |
| 1691 | # Try some missing stuff |
| 1692 | self.assertIs(self._im.get_param('foobar', missing), missing) |
| 1693 | self.assertIs(self._im.get_param('attachment', missing, |
| 1694 | header='foobar'), missing) |
| 1695 | |
| 1696 | |
| 1697 | # Test the basic MIMEApplication class |
nothing calls this directly
no test coverage detected