MCPcopy
hub / github.com/django/django / test_multiple_forms

Method test_multiple_forms

tests/test_utils/tests.py:1614–1625  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1612 self.assertFormSetError(TestFormset.valid(), 0, "field", [])
1613
1614 def test_multiple_forms(self):
1615 formset = TestFormset(
1616 {
1617 "form-TOTAL_FORMS": "2",
1618 "form-INITIAL_FORMS": "0",
1619 "form-0-field": "valid",
1620 "form-1-field": "invalid",
1621 }
1622 )
1623 formset.full_clean()
1624 self.assertFormSetError(formset, 0, "field", [])
1625 self.assertFormSetError(formset, 1, "field", ["invalid value"])
1626
1627 def test_field_not_in_form(self):
1628 msg = (

Callers

nothing calls this directly

Calls 3

TestFormsetClass · 0.85
assertFormSetErrorMethod · 0.80
full_cleanMethod · 0.45

Tested by

no test coverage detected