summaryrefslogtreecommitdiff
path: root/tests/check_framework
diff options
context:
space:
mode:
authorChris Lamb <chris@chris-lamb.co.uk>2017-02-24 23:13:48 +0800
committerTim Graham <timograham@gmail.com>2017-02-24 13:59:28 -0500
commit0417bf47a6fd00d9a6a4c711780ce01f35f62d59 (patch)
treebef5a95abfef82841d091328b87b36f93cdee032 /tests/check_framework
parenta86ec78fe6a043ca96815dbb18cbae7d48bab565 (diff)
[1.11.x] Fixed #27874 -- Fixed URL namespace warning (urls.W005) for nested namespaces.
Backport of 8d4885ede578b5beef7626cd31bbd19a95bd678a from master
Diffstat (limited to 'tests/check_framework')
-rw-r--r--tests/check_framework/urls/unique_namespaces.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/check_framework/urls/unique_namespaces.py b/tests/check_framework/urls/unique_namespaces.py
index 897f27757e..10d427eec9 100644
--- a/tests/check_framework/urls/unique_namespaces.py
+++ b/tests/check_framework/urls/unique_namespaces.py
@@ -5,7 +5,14 @@ common_url_patterns = ([
url(r'^app-url/', include([])),
], 'common')
+nested_url_patterns = ([
+ url(r'^common/', include(common_url_patterns, namespace='nested')),
+], 'nested')
+
urlpatterns = [
url(r'^app-ns1-0/', include(common_url_patterns, namespace='app-include-1')),
- url(r'^app-ns1-1/', include(common_url_patterns, namespace='app-include-2'))
+ url(r'^app-ns1-1/', include(common_url_patterns, namespace='app-include-2')),
+ # 'nested' is included twice but namespaced by nested-1 and nested-2.
+ url(r'^app-ns1-2/', include(nested_url_patterns, namespace='nested-1')),
+ url(r'^app-ns1-3/', include(nested_url_patterns, namespace='nested-2')),
]