diff --git a/wagtail/wagtailcore/tests/test_blocks.py b/wagtail/wagtailcore/tests/test_blocks.py index 453272d40..282c879ef 100644 --- a/wagtail/wagtailcore/tests/test_blocks.py +++ b/wagtail/wagtailcore/tests/test_blocks.py @@ -561,26 +561,26 @@ class TestStreamBlock(unittest.TestCase): self.assertIn('', html) def test_html_declarations(self): - class LinkBlock(blocks.StructBlock): - title = blocks.CharBlock() - link = blocks.URLBlock() + class ArticleBlock(blocks.StreamBlock): + heading = blocks.CharBlock() + paragraph = blocks.CharBlock() - block = blocks.ListBlock(LinkBlock) + block = ArticleBlock() html = block.html_declarations() - self.assertIn('', html) - self.assertIn('', html) + self.assertIn('', html) + self.assertIn('', html) def test_html_declarations_uses_default(self): - class LinkBlock(blocks.StructBlock): - title = blocks.CharBlock(default="Github") - link = blocks.URLBlock(default="http://www.github.com") + class ArticleBlock(blocks.StreamBlock): + heading = blocks.CharBlock(default="Fish found on moon") + paragraph = blocks.CharBlock(default="Lorem ipsum dolor sit amet") - block = blocks.ListBlock(LinkBlock) + block = ArticleBlock() html = block.html_declarations() - self.assertIn('', html) - self.assertIn('', html) + self.assertIn('', html) + self.assertIn('', html) def test_media_inheritance(self): class ScriptedCharBlock(blocks.CharBlock): @@ -598,7 +598,7 @@ class TestStreamBlock(unittest.TestCase): def html_declarations(self): return '' - class ArticleBlock(blocks.StructBlock): + class ArticleBlock(blocks.StreamBlock): heading = CharBlockWithDeclarations(default="Torchbox") paragraph = blocks.CharBlock()