1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase.

This commit is contained in:
Tim Graham
2016-12-07 17:42:31 -05:00
committed by GitHub
parent f909fa84be
commit b5f0b3478d
27 changed files with 84 additions and 104 deletions

View File

@@ -4,7 +4,6 @@ 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):
@@ -35,7 +34,7 @@ class CheckUrlsTest(SimpleTestCase):
result = check_url_config(None)
warning = result[0]
self.assertEqual(warning.id, 'urls.E004')
six.assertRegex(self, warning.msg, (
self.assertRegex(warning.msg, (
r"^Your URL pattern \('\^tuple/\$', <function <lambda> at 0x(\w+)>\) is "
r"invalid. Ensure that urlpatterns is a list of url\(\) instances.$"
))