示例#1
0
 def test_markuptextarea_render(self):
     a = Article(normal_field='**normal**', normal_field_markup_type='markdown',
                 default_field='**default**', markdown_field='**markdown**',
                 markup_choices_field_markup_type='nomarkup')
     a.save()
     af = ArticleForm(instance=a)
     self.assertEquals(unicode(af['normal_field']), u'<textarea id="id_normal_field" rows="10" cols="40" name="normal_field">**normal**</textarea>')
示例#2
0
 def test_markuptextarea_render(self):
     a = Article(normal_field='**normal**', normal_field_markup_type='markdown',
                 default_field='**default**', markdown_field='**markdown**',
                 markup_choices_field_markup_type='nomarkup')
     a.save()
     af = ArticleForm(instance=a)
     self.assertEquals(unicode(af['normal_field']), u'<textarea id="id_normal_field" rows="10" cols="40" name="normal_field">**normal**</textarea>')
示例#3
0
 def test_markuptextarea_render(self):
     expected = (
         '<textarea id="id_normal_field" required rows="10" cols="40" '
         'name="normal_field">**normal**</textarea>')
     a = Article(normal_field='**normal**',
                 normal_field_markup_type='markdown',
                 default_field='**default**',
                 markdown_field='**markdown**',
                 markup_choices_field_markup_type='nomarkup')
     a.save()
     af = ArticleForm(instance=a)
     self.assertHTMLEqual(smart_text(af['normal_field']), expected)
示例#4
0
 def test_markuptextarea_render(self):
     expected = ('<textarea id="id_normal_field" required rows="10" cols="40" '
                 'name="normal_field">**normal**</textarea>'
                 )
     a = Article(normal_field='**normal**',
                 normal_field_markup_type='markdown',
                 default_field='**default**',
                 markdown_field='**markdown**',
                 markup_choices_field_markup_type='nomarkup')
     a.save()
     af = ArticleForm(instance=a)
     self.assertHTMLEqual(smart_text(af['normal_field']), expected)