def test_kwargs_passthrough(self):
     attrs = {"cols": 50, "class": "something"}
     ckeditor = CKEditorWidget(attrs=attrs)
     widget = RichTextWidget(attrs=attrs)
     ckeditor_out = str(ckeditor.render("widget", ""))
     widget_out = str(widget.render("widget", ""))
     self.assertEquals(ckeditor_out, widget_out)
Пример #2
0
 def test_render(self):
     widget = CKEditorWidget()
     htmlout = str(widget.render('widget', ''))
     self.assertTrue('class="ckeditor"' in htmlout)
 def test_default(self):
     ckeditor = CKEditorWidget()
     widget = RichTextWidget()
     ckeditor_out = str(ckeditor.render("widget", ""))
     widget_out = str(widget.render("widget", ""))
     self.assertEquals(ckeditor_out, widget_out)
Пример #4
0
 def test_render_with_additional_classes(self):
     widget = CKEditorWidget(attrs={'class': 'something'})
     htmlout = widget.render('widget', '')
     self.assertTrue('class="something ckeditor"' in htmlout)