diff options
| author | Ville Skyttä <ville.skytta@iki.fi> | 2016-06-14 16:03:12 +0300 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-06-14 09:04:53 -0400 |
| commit | 84737135f6606aff2e529609de740eba2332c7b4 (patch) | |
| tree | 0592e3bea9158a7efb7a96ebc262e4704d82194f | |
| parent | 61bcf0413244375a74d9c2aae9190d9b057f9635 (diff) | |
[1.10.x] Removed usage of a deprecated unittest assertion.
Backport of fa654da6130df80239e181c432595442e688ee8b from master
| -rw-r--r-- | tests/check_framework/test_urls.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/check_framework/test_urls.py b/tests/check_framework/test_urls.py index a1ac727057..786d040493 100644 --- a/tests/check_framework/test_urls.py +++ b/tests/check_framework/test_urls.py @@ -4,6 +4,7 @@ from django.core.checks.urls import ( ) from django.test import SimpleTestCase from django.test.utils import override_settings +from django.utils import six class CheckUrlsTest(SimpleTestCase): @@ -34,7 +35,7 @@ class CheckUrlsTest(SimpleTestCase): result = check_url_config(None) warning = result[0] self.assertEqual(warning.id, 'urls.E004') - self.assertRegexpMatches(warning.msg, ( + six.assertRegex(self, warning.msg, ( r"^Your URL pattern \('\^tuple/\$', <function <lambda> at 0x(\w+)>\) is " r"invalid. Ensure that urlpatterns is a list of url\(\) instances.$" )) |
