mirror of
https://github.com/django/django.git
synced 2025-11-25 05:04:26 +00:00
Refs #23919 -- Simplified assertRaisesRegex()'s that accounted for Python 2.
This commit is contained in:
parent
dc8834cad4
commit
109b33f64c
12 changed files with 43 additions and 42 deletions
|
|
@ -68,7 +68,7 @@ class ParserTests(SimpleTestCase):
|
|||
Variable("article._hidden")
|
||||
|
||||
# Variables should raise on non string type
|
||||
with self.assertRaisesRegex(TypeError, "Variable must be a string or number, got <(class|type) 'dict'>"):
|
||||
with self.assertRaisesMessage(TypeError, "Variable must be a string or number, got <class 'dict'>"):
|
||||
Variable({})
|
||||
|
||||
def test_filter_args_count(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue