def test_post(self): post = {'form0-field1': 'asdf', 'form0-field2': 2} form = FormSet(post, form_class=Form1, repeat=2) ## Form isn't valid... self.assertFalse(form.is_valid()) ### because of the second form self.assertTrue(form._subforms[0].is_valid())
def test_minimal_post(self): post = {'form0-field1': 'asdf', 'form0-field2': 2} form = FormSet(post, form_class=Form1, repeat=2, min_valid=1) self.assertTrue(form.is_valid())