Refs #23919 -- Simplified assertRaisesRegex()'s that accounted for Python 2.

This commit is contained in:
Tim Graham 2017-01-19 21:10:33 -05:00 committed by Aymeric Augustin
parent dc8834cad4
commit 109b33f64c
12 changed files with 43 additions and 42 deletions

View file

@ -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):