MCPcopy
hub / github.com/django/django / test_root_path

Method test_root_path

tests/handlers/tests.py:332–339  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

330 await self.async_client.get("/unawaited/")
331
332 def test_root_path(self):
333 async_request_factory = AsyncRequestFactory()
334 request = async_request_factory.request(
335 **{"path": "/root/somepath/", "root_path": "/root"}
336 )
337 self.assertEqual(request.path, "/root/somepath/")
338 self.assertEqual(request.script_name, "/root")
339 self.assertEqual(request.path_info, "/somepath/")
340
341 @override_settings(FORCE_SCRIPT_NAME="/FORCED_PREFIX")
342 def test_force_script_name(self):

Callers

nothing calls this directly

Calls 2

requestMethod · 0.95
AsyncRequestFactoryClass · 0.90

Tested by

no test coverage detected