summaryrefslogtreecommitdiff
path: root/tests/forms_tests
diff options
context:
space:
mode:
authormanav014 <dpsman13016@gmail.com>2020-10-21 04:18:02 +0530
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-10-21 11:47:07 +0200
commit096b14f0ac8513c5d76c1b693721b6aede18777d (patch)
tree9d05389cfe8d9052c59a10a8afa587c45a75c483 /tests/forms_tests
parentf5e07601b233a50e6bcca438f65fd7028277f78b (diff)
downloaddjango-096b14f0ac8513c5d76c1b693721b6aede18777d.tar.gz
Fixed #13060 -- Improved error message when ManagementForm data is missing.
Diffstat (limited to 'tests/forms_tests')
-rw-r--r--tests/forms_tests/tests/test_formsets.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/forms_tests/tests/test_formsets.py b/tests/forms_tests/tests/test_formsets.py
index 267b949461..a11c183f86 100644
--- a/tests/forms_tests/tests/test_formsets.py
+++ b/tests/forms_tests/tests/test_formsets.py
@@ -1301,7 +1301,10 @@ ArticleFormSet = formset_factory(ArticleForm)
class TestIsBoundBehavior(SimpleTestCase):
def test_no_data_raises_validation_error(self):
- msg = 'ManagementForm data is missing or has been tampered with'
+ msg = (
+ 'ManagementForm data is missing or has been tampered with. '
+ 'Missing fields: form-TOTAL_FORMS, form-INITIAL_FORMS'
+ )
with self.assertRaisesMessage(ValidationError, msg):
ArticleFormSet({}).is_valid()