diff options
| author | Tim Graham <timograham@gmail.com> | 2015-05-17 19:09:30 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-05-18 10:04:18 -0400 |
| commit | e89c3a46035e9fe17c373a6c9cd63b9fd631d596 (patch) | |
| tree | 2be88d9fa1823391f7f3db3818a4034ea8f3b50f /django | |
| parent | a0175724b086127a4e13612042961d3ba88d6bd9 (diff) | |
Added backwards compatibility for assertRaisesMessage callable_obj param.
This was broken in c2bc1cefdcbbf074408f4a4cace88b315cf9d652 (refs #23763).
Diffstat (limited to 'django')
| -rw-r--r-- | django/test/testcases.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/django/test/testcases.py b/django/test/testcases.py index 86a275e7fd..421134572d 100644 --- a/django/test/testcases.py +++ b/django/test/testcases.py @@ -589,6 +589,10 @@ class SimpleTestCase(unittest.TestCase): args: Function to be called and extra positional args. kwargs: Extra kwargs. """ + # callable_obj was a documented kwarg in Django 1.8 and older. + callable_obj = kwargs.pop('callable_obj', None) + if callable_obj: + args = (callable_obj,) + args return six.assertRaisesRegex(self, expected_exception, re.escape(expected_message), *args, **kwargs) |
