mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-12 09:13:14 +00:00
Removed some stray code
This commit is contained in:
parent
18a4722b51
commit
446a9868dc
1 changed files with 0 additions and 29 deletions
|
|
@ -463,35 +463,6 @@ class TestStreamBlock(unittest.TestCase):
|
|||
self.assertIn('<input id="myarticle-1-value" name="myarticle-1-value" type="text" value="My first paragraph" />', html)
|
||||
self.assertIn('<input id="myarticle-2-value" name="myarticle-2-value" type="text" value="My second paragraph" />', html)
|
||||
|
||||
def test_render_form_uses_default_value(self):
|
||||
class ArticleBlock(blocks.StreamBlock):
|
||||
heading = blocks.FieldBlock(forms.CharField(), )
|
||||
paragraph = blocks.FieldBlock(forms.CharField())
|
||||
|
||||
default = [
|
||||
{
|
||||
'type': 'heading',
|
||||
'value': "My title",
|
||||
}
|
||||
]
|
||||
|
||||
block = ArticleBlock()
|
||||
value = block.to_python([
|
||||
{
|
||||
'type': 'heading',
|
||||
'value': "My title",
|
||||
},
|
||||
{
|
||||
'type': 'paragraph',
|
||||
'value': 'My first paragraph',
|
||||
},
|
||||
{
|
||||
'type': 'paragraph',
|
||||
'value': 'My second paragraph',
|
||||
},
|
||||
])
|
||||
return block.render_form(value, prefix='myarticle')
|
||||
|
||||
def test_html_declarations(self):
|
||||
class LinkBlock(blocks.StructBlock):
|
||||
title = blocks.FieldBlock(forms.CharField())
|
||||
|
|
|
|||
Loading…
Reference in a new issue