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

Refs #28593 -- Moved django.conf.urls.include() to django.urls().

The old location remains for backwards compatibility. Documentation
will be updated separately along with the rest of the URL routing changes.
This commit is contained in:
Tim Graham
2017-09-13 15:24:12 -04:00
parent 0214f367bc
commit ee4043f735
5 changed files with 106 additions and 94 deletions

View File

@@ -1158,19 +1158,19 @@ class IncludeTests(SimpleTestCase):
def test_include_namespace(self):
msg = (
"Specifying a namespace in django.conf.urls.include() without "
"providing an app_name is not supported."
'Specifying a namespace in include() without providing an '
'app_name is not supported.'
)
with self.assertRaisesMessage(ImproperlyConfigured, msg):
include(self.url_patterns, 'namespace')
def test_include_4_tuple(self):
msg = 'Passing a 4-tuple to django.conf.urls.include() is not supported.'
msg = 'Passing a 4-tuple to include() is not supported.'
with self.assertRaisesMessage(ImproperlyConfigured, msg):
include((self.url_patterns, 'app_name', 'namespace', 'blah'))
def test_include_3_tuple(self):
msg = 'Passing a 3-tuple to django.conf.urls.include() is not supported.'
msg = 'Passing a 3-tuple to include() is not supported.'
with self.assertRaisesMessage(ImproperlyConfigured, msg):
include((self.url_patterns, 'app_name', 'namespace'))