Beispiel #1
0
 def test_dummy(self):
     with self.assertRaises(KeyError):
         convert(self._ir, OutputType.Dummy)
Beispiel #2
0
 def test_html(self):
     self.assertIn(
             "This is only a test.",
             convert(self._hr, OutputType.Text).value)
Beispiel #3
0
 def test_fallback(self):
     self.assertEqual(
             convert(self._ir, OutputType.Fallback).value,
             True)
Beispiel #4
0
 def test_image_dimensions(self):
     self.assertEqual(
             convert(self._ir, OutputType.ImageDimensions).value,
             (896, 896))
Beispiel #5
0
 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)