Exemplo n.º 1
0
 def test_field_in_form(self):
     form = FormFactory.build()
     field = FieldFactory.build(form=form)
     dj_form = form.get_django_form_class(fields=[field])
     assert_equal(len(dj_form.base_fields), 1)
     assert_equal(type(dj_form.base_fields.values()[0]), type(field.get_django_field()))
Exemplo n.º 2
0
 def test_simple_form(self):
     form = FormFactory.build()
     dj_form = form.get_django_form_class()
     assert_true(issubclass(dj_form, forms.Form))