summaryrefslogtreecommitdiff
path: root/tests/test_utils
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2023-01-12 14:32:00 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-01-17 11:49:15 +0100
commit23c87874397a22ca80c0d6fa8648fb58ee3ab28a (patch)
treed0c3adf2eaa48a17d5725e70aa27816c5fd18306 /tests/test_utils
parent23ec318988cb22bef176b9d81e4091715a4f41ff (diff)
Refs #33348 -- Removed support for passing errors=None to SimpleTestCase.assertFormError()/assertFormsetErrors().
Per deprecation timeline.
Diffstat (limited to 'tests/test_utils')
-rw-r--r--tests/test_utils/tests.py34
1 files changed, 0 insertions, 34 deletions
diff --git a/tests/test_utils/tests.py b/tests/test_utils/tests.py
index a377479d38..f0c8735087 100644
--- a/tests/test_utils/tests.py
+++ b/tests/test_utils/tests.py
@@ -1769,23 +1769,6 @@ class AssertFormErrorDeprecationTests(SimpleTestCase):
signature.
"""
- @ignore_warnings(category=RemovedInDjango50Warning)
- def test_assert_form_error_errors_none(self):
- msg = (
- "The errors of field 'field' on form <TestForm bound=True, valid=False, "
- "fields=(field)> don't match."
- )
- with self.assertRaisesMessage(AssertionError, msg):
- self.assertFormError(TestForm.invalid(), "field", None)
-
- def test_assert_form_error_errors_none_warning(self):
- msg = (
- "Passing errors=None to assertFormError() is deprecated, use "
- "errors=[] instead."
- )
- with self.assertWarnsMessage(RemovedInDjango50Warning, msg):
- self.assertFormError(TestForm.valid(), "field", None)
-
def _assert_form_error_old_api_cases(self, form, field, errors, msg_prefix):
response = mock.Mock(context=[{"form": TestForm.invalid()}])
return (
@@ -1852,23 +1835,6 @@ class AssertFormErrorDeprecationTests(SimpleTestCase):
with self.assertRaises(AssertionError):
self.assertFormError(*args, **kwargs)
- @ignore_warnings(category=RemovedInDjango50Warning)
- def test_assert_formset_error_errors_none(self):
- msg = (
- "The errors of field 'field' on form 0 of formset <TestFormset: bound=True "
- "valid=False total_forms=1> don't match."
- )
- with self.assertRaisesMessage(AssertionError, msg):
- self.assertFormSetError(TestFormset.invalid(), 0, "field", None)
-
- def test_assert_formset_error_errors_none_warning(self):
- msg = (
- "Passing errors=None to assertFormSetError() is deprecated, use "
- "errors=[] instead."
- )
- with self.assertWarnsMessage(RemovedInDjango50Warning, msg):
- self.assertFormSetError(TestFormset.valid(), 0, "field", None)
-
def _assert_formset_error_old_api_cases(
self, formset, form_index, field, errors, msg_prefix
):