MCPcopy
hub / github.com/django/django / test_trailing_slash_required

Method test_trailing_slash_required

tests/admin_views/tests.py:312–318  ·  view source on GitHub ↗

If you leave off the trailing slash, app should redirect and add it.

(self)

Source from the content-addressed store, hash-verified

310)
311class AdminViewBasicTest(AdminViewBasicTestCase):
312 def test_trailing_slash_required(self):
313 """
314 If you leave off the trailing slash, app should redirect and add it.
315 """
316 add_url = reverse("admin:admin_views_article_add")
317 response = self.client.get(add_url[:-1])
318 self.assertRedirects(response, add_url, status_code=301)
319
320 def test_basic_add_GET(self):
321 """

Callers

nothing calls this directly

Calls 3

reverseFunction · 0.90
assertRedirectsMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected