diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-01-12 14:32:00 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-01-17 11:49:15 +0100 |
| commit | 23c87874397a22ca80c0d6fa8648fb58ee3ab28a (patch) | |
| tree | d0c3adf2eaa48a17d5725e70aa27816c5fd18306 /django/test | |
| parent | 23ec318988cb22bef176b9d81e4091715a4f41ff (diff) | |
Refs #33348 -- Removed support for passing errors=None to SimpleTestCase.assertFormError()/assertFormsetErrors().
Per deprecation timeline.
Diffstat (limited to 'django/test')
| -rw-r--r-- | django/test/testcases.py | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/django/test/testcases.py b/django/test/testcases.py index c29a13a710..c37e99cded 100644 --- a/django/test/testcases.py +++ b/django/test/testcases.py @@ -724,15 +724,6 @@ class SimpleTestCase(unittest.TestCase): You can pass field=None to check the form's non-field errors. """ - if errors is None: - warnings.warn( - "Passing errors=None to assertFormError() is deprecated, use " - "errors=[] instead.", - RemovedInDjango50Warning, - stacklevel=2, - ) - errors = [] - if msg_prefix: msg_prefix += ": " errors = to_list(errors) @@ -760,15 +751,6 @@ class SimpleTestCase(unittest.TestCase): Other parameters are the same as assertFormError(). """ - if errors is None: - warnings.warn( - "Passing errors=None to assertFormSetError() is deprecated, " - "use errors=[] instead.", - RemovedInDjango50Warning, - stacklevel=2, - ) - errors = [] - if form_index is None and field is not None: raise ValueError("You must use field=None with form_index=None.") |
