(self)
| 1696 | self.assertEqual(im.get_content_type(), 'image/fish') |
| 1697 | |
| 1698 | def test_add_header(self): |
| 1699 | self._make_image('gif') |
| 1700 | eq = self.assertEqual |
| 1701 | self._im.add_header('Content-Disposition', 'attachment', |
| 1702 | filename='dingusfish.gif') |
| 1703 | eq(self._im['content-disposition'], |
| 1704 | 'attachment; filename="dingusfish.gif"') |
| 1705 | eq(self._im.get_params(header='content-disposition'), |
| 1706 | [('attachment', ''), ('filename', 'dingusfish.gif')]) |
| 1707 | eq(self._im.get_param('filename', header='content-disposition'), |
| 1708 | 'dingusfish.gif') |
| 1709 | missing = [] |
| 1710 | eq(self._im.get_param('attachment', header='content-disposition'), '') |
| 1711 | self.assertIs(self._im.get_param('foo', failobj=missing, |
| 1712 | header='content-disposition'), missing) |
| 1713 | # Try some missing stuff |
| 1714 | self.assertIs(self._im.get_param('foobar', missing), missing) |
| 1715 | self.assertIs(self._im.get_param('attachment', missing, |
| 1716 | header='foobar'), missing) |
| 1717 | |
| 1718 | |
| 1719 | # Test the basic MIMEApplication class |
nothing calls this directly
no test coverage detected