Exemple #1
0
 def test_deform_integration_render(self):
     import deform_autoneed
     deform_autoneed.includeme()
     form = _mk_richtext_form()
     form.render()
     resources = get_needed().resources()
     self.assertIn('deform.js', [x.filename for x in resources])
Exemple #2
0
 def test_deform_integration_exception_render(self):
     import deform_autoneed
     deform_autoneed.includeme()
     form = _mk_richtext_form()
     try:
         form.validate([('foo', 'bar')])
     except deform.ValidationFailure as exc:
         exc.render()
     resources = get_needed().resources()
     self.assertIn('deform.js', [x.filename for x in resources])
Exemple #3
0
 def test_includeme(self):
     import deform_autoneed
     deform_autoneed.includeme()
     self.assertIn('jquery.form', deform_autoneed.resource_registry.requirements)