MCPcopy
hub / github.com/django/django / test_re_path

Method test_re_path

tests/urlpatterns/tests.py:95–101  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

93 self.assertEqual(match.extra_kwargs, {})
94
95 def test_re_path(self):
96 match = resolve("/regex/1/")
97 self.assertEqual(match.url_name, "regex")
98 self.assertEqual(match.kwargs, {"pk": "1"})
99 self.assertEqual(match.route, "^regex/(?P<pk>[0-9]+)/$")
100 self.assertEqual(match.captured_kwargs, {"pk": "1"})
101 self.assertEqual(match.extra_kwargs, {})
102
103 def test_re_path_with_optional_parameter(self):
104 for url, kwargs in (

Callers

nothing calls this directly

Calls 1

resolveFunction · 0.90

Tested by

no test coverage detected