MCPcopy
hub / github.com/django/django / test_append_slash_disabled

Method test_append_slash_disabled

tests/middleware/tests.py:138–143  ·  view source on GitHub ↗

Disabling append slash functionality should leave slashless URLs alone.

(self)

Source from the content-addressed store, hash-verified

136
137 @override_settings(APPEND_SLASH=False)
138 def test_append_slash_disabled(self):
139 """
140 Disabling append slash functionality should leave slashless URLs alone.
141 """
142 request = self.rf.get("/slash")
143 self.assertEqual(CommonMiddleware(get_response_404)(request).status_code, 404)
144
145 @override_settings(APPEND_SLASH=True)
146 def test_append_slash_opt_out(self):

Callers

nothing calls this directly

Calls 2

CommonMiddlewareClass · 0.90
getMethod · 0.45

Tested by

no test coverage detected