| 9 | Not attempting any reuse of the above test, this diff passes: |
| 10 | |
| 11 | {{{ |
| 12 | diff --git a/tests/urlpatterns/path_base64_urls.py b/tests/urlpatterns/path_base64_urls.py |
| 13 | index 9b69f929fe..52a4045281 100644 |
| 14 | --- a/tests/urlpatterns/path_base64_urls.py |
| 15 | +++ b/tests/urlpatterns/path_base64_urls.py |
| 16 | @@ -12,4 +12,5 @@ urlpatterns = [ |
| 17 | path('base64/<base64:value>/', views.empty_view, name='base64'), |
| 18 | path('base64/<base64:base>/subpatterns/', include(subpatterns)), |
| 19 | path('base64/<base64:base>/namespaced/', include((subpatterns, 'namespaced-base64'))), |
| 20 | + path('base64/<base64:base>/namespaced/', include((subpatterns, 'namespaced-base64'), namespace='instance-ns-base64')), |
| 21 | ] |
| 22 | diff --git a/tests/urlpatterns/tests.py b/tests/urlpatterns/tests.py |
| 23 | index b3d97ec5b9..f108fdfb55 100644 |
| 24 | --- a/tests/urlpatterns/tests.py |
| 25 | +++ b/tests/urlpatterns/tests.py |
| 26 | @@ -70,6 +70,16 @@ class SimplifiedURLTests(SimpleTestCase): |
| 27 | url = reverse(url_name, kwargs=kwargs) |
| 28 | self.assertEqual(url, expected) |
| 29 | |
| 30 | + @override_settings(ROOT_URLCONF='urlpatterns.path_base64_urls') |
| 31 | + def test_converter_reverse_with_instance_namespace(self): |
| 32 | + expected = '/base64/aGVsbG8=/namespaced/d29ybGQ=/' |
| 33 | + url_name = 'subpattern-base64' |
| 34 | + instance_ns = 'instance-ns-base64' |
| 35 | + kwargs = included_kwargs |
| 36 | + url_name = '%s:%s' % (instance_ns, url_name) |
| 37 | + url = reverse(url_name, kwargs=kwargs) |
| 38 | + self.assertEqual(url, expected) |
| 39 | + |
| 40 | def test_path_inclusion_is_matchable(self): |
| 41 | match = resolve('/included_urls/extra/something/') |
| 42 | self.assertEqual(match.url_name, 'inner-extra') |
| 43 | }}} |
| 44 | |