From 06605acae35c52581f1dd9d86015ea16b7490c0e Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Mon, 27 Feb 2017 18:49:35 +0000 Subject: [PATCH] Use assertTagInTemplateScript to test HTML declarations --- wagtail/wagtailcore/tests/test_blocks.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/wagtail/wagtailcore/tests/test_blocks.py b/wagtail/wagtailcore/tests/test_blocks.py index 7dd2c53c33..27bae6fc27 100644 --- a/wagtail/wagtailcore/tests/test_blocks.py +++ b/wagtail/wagtailcore/tests/test_blocks.py @@ -1310,7 +1310,7 @@ class TestStructBlock(SimpleTestCase): self.assertEqual(result, """

Bonjour

monde italique
""") -class TestListBlock(SimpleTestCase): +class TestListBlock(SimpleTestCase, WagtailTestUtils): def test_initialise_with_class(self): block = blocks.ListBlock(blocks.CharBlock) @@ -1489,11 +1489,11 @@ class TestListBlock(SimpleTestCase): block = blocks.ListBlock(LinkBlock) html = block.html_declarations() - self.assertInHTML( + self.assertTagInTemplateScript( '', html ) - self.assertInHTML( + self.assertTagInTemplateScript( '', html ) @@ -1506,14 +1506,14 @@ class TestListBlock(SimpleTestCase): block = blocks.ListBlock(LinkBlock) html = block.html_declarations() - self.assertInHTML( + self.assertTagInTemplateScript( ( '' ), html ) - self.assertInHTML( + self.assertTagInTemplateScript( ( '' @@ -1632,7 +1632,7 @@ class TestListBlock(SimpleTestCase): self.assertIn('value="chocolate"', form_html) -class TestStreamBlock(SimpleTestCase): +class TestStreamBlock(SimpleTestCase, WagtailTestUtils): def test_initialisation(self): block = blocks.StreamBlock([ ('heading', blocks.CharBlock()), @@ -2045,8 +2045,8 @@ class TestStreamBlock(SimpleTestCase): block = ArticleBlock() html = block.html_declarations() - self.assertInHTML('', html) - self.assertInHTML( + self.assertTagInTemplateScript('', html) + self.assertTagInTemplateScript( '', html ) @@ -2059,14 +2059,14 @@ class TestStreamBlock(SimpleTestCase): block = ArticleBlock() html = block.html_declarations() - self.assertInHTML( + self.assertTagInTemplateScript( ( '' ), html ) - self.assertInHTML( + self.assertTagInTemplateScript( ( ''