From b5f0b3478dfcf0335f8ac2038d59f54b4a05f2a0 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Wed, 7 Dec 2016 17:42:31 -0500 Subject: Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase. --- tests/urlpatterns_reverse/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/urlpatterns_reverse') diff --git a/tests/urlpatterns_reverse/tests.py b/tests/urlpatterns_reverse/tests.py index ca894fcc8e..4b31e382e1 100644 --- a/tests/urlpatterns_reverse/tests.py +++ b/tests/urlpatterns_reverse/tests.py @@ -1005,7 +1005,7 @@ class ViewLoadingTests(SimpleTestCase): def test_exceptions(self): # A missing view (identified by an AttributeError) should raise # ViewDoesNotExist, ... - with six.assertRaisesRegex(self, ViewDoesNotExist, ".*View does not exist in.*"): + with self.assertRaisesMessage(ViewDoesNotExist, "View does not exist in"): get_callable('urlpatterns_reverse.views.i_should_not_exist') # ... but if the AttributeError is caused by something else don't # swallow it. -- cgit v1.3