summaryrefslogtreecommitdiff
path: root/tests/check_framework/urls
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 10:13:48 -0500
commit8d4885ede578b5beef7626cd31bbd19a95bd678a (patch)
tree516fb06c3f8b314a136b8a1657d647f619c54fff /tests/check_framework/urls
parentb6fbf3e8e56b34fdc4367d582bbcb036e4aa2972 (diff)
Fixed #27874 -- Fixed URL namespace warning (urls.W005) for nested namespaces.
Diffstat (limited to 'tests/check_framework/urls')
-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')),
]