MCPcopy
hub / github.com/django/django / test_append_slash_have_slash

Method test_append_slash_have_slash

tests/middleware/tests.py:47–53  ·  view source on GitHub ↗

URLs with slashes should go unmolested.

(self)

Source from the content-addressed store, hash-verified

45
46 @override_settings(APPEND_SLASH=True)
47 def test_append_slash_have_slash(self):
48 """
49 URLs with slashes should go unmolested.
50 """
51 request = self.rf.get("/slash/")
52 self.assertIsNone(CommonMiddleware(get_response_404).process_request(request))
53 self.assertEqual(CommonMiddleware(get_response_404)(request).status_code, 404)
54
55 @override_settings(APPEND_SLASH=True)
56 def test_append_slash_slashless_resource(self):

Callers

nothing calls this directly

Calls 3

CommonMiddlewareClass · 0.90
getMethod · 0.45
process_requestMethod · 0.45

Tested by

no test coverage detected