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