mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Added backwards compatibility for assertRaisesMessage callable_obj param.
This was broken in c2bc1cefdc (refs #23763).
This commit is contained in:
@@ -752,6 +752,12 @@ class AssertRaisesMsgTest(SimpleTestCase):
|
||||
raise ValueError("[.*x+]y?")
|
||||
self.assertRaisesMessage(ValueError, "[.*x+]y?", func1)
|
||||
|
||||
def test_callable_obj_param(self):
|
||||
# callable_obj was a documented kwarg in Django 1.8 and older.
|
||||
def func1():
|
||||
raise ValueError("[.*x+]y?")
|
||||
self.assertRaisesMessage(ValueError, "[.*x+]y?", callable_obj=func1)
|
||||
|
||||
|
||||
class AssertFieldOutputTests(SimpleTestCase):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user