def test_dummy(self): with self.assertRaises(KeyError): convert(self._ir, OutputType.Dummy)
def test_html(self): self.assertIn( "This is only a test.", convert(self._hr, OutputType.Text).value)
def test_fallback(self): self.assertEqual( convert(self._ir, OutputType.Fallback).value, True)
def test_image_dimensions(self): self.assertEqual( convert(self._ir, OutputType.ImageDimensions).value, (896, 896))
def test_last_modified(self): self.assertIsNotNone( convert(self._ir, OutputType.LastModified).value)
def test_empty_html(self): self.assertEqual( convert(self._er, OutputType.Text, mime_override="text/html"), None, "empty HTML document did not produce empty conversion")
def test_html(self): self.assertEqual( "This is only a test. " "There's one paragraph, " "and then there's the other paragraph.", convert(self._hr, OutputType.Text).value)