Fixed test which broke under html5lib

The test used HTML which wasn't valid HTML5. html5lib corrects these errors whereas lxml didn't so the result of the test is different.
pull/466/head
Karl Hobley 2014-07-11 16:44:45 +01:00
rodzic ac6292d614
commit 8ab347632a
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -27,7 +27,7 @@ class TestDbWhitelister(TestCase):
def test_image_embed_is_rewritten(self):
input_html = '<p>OMG look at this picture of a kitten: <figure data-embedtype="image" data-id="5" data-format="image-with-caption" data-alt="A cute kitten" class="fancy-image"><img src="/media/images/kitten.jpg" width="320" height="200" alt="A cute kitten" /><figcaption>A kitten, yesterday.</figcaption></figure></p>'
output_html = DbWhitelister.clean(input_html)
expected = '<p>OMG look at this picture of a kitten: <embed embedtype="image" id="5" format="image-with-caption" alt="A cute kitten" /></p>'
expected = '<p>OMG look at this picture of a kitten: </p><embed embedtype="image" id="5" format="image-with-caption" alt="A cute kitten" /><p></p>'
self.assertHtmlEqual(expected, output_html)
def test_media_embed_is_rewritten(self):