mirror of
https://github.com/django/django.git
synced 2025-11-25 05:04:26 +00:00
Refs #26022 -- Used context manager version of assertRaisesMessage in tests.
This commit is contained in:
parent
3d0dcd7f5a
commit
253adc2b8a
21 changed files with 584 additions and 566 deletions
|
|
@ -801,7 +801,8 @@ class AssertRaisesMsgTest(SimpleTestCase):
|
|||
"""assertRaisesMessage shouldn't interpret RE special chars."""
|
||||
def func1():
|
||||
raise ValueError("[.*x+]y?")
|
||||
self.assertRaisesMessage(ValueError, "[.*x+]y?", func1)
|
||||
with self.assertRaisesMessage(ValueError, "[.*x+]y?"):
|
||||
func1()
|
||||
|
||||
@ignore_warnings(category=RemovedInDjango20Warning)
|
||||
def test_callable_obj_param(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue