MCPcopy
hub / github.com/marimo-team/marimo / test_accept_header_case_insensitive

Function test_accept_header_case_insensitive

tests/_server/test_errors.py:303–316  ·  view source on GitHub ↗

Test that Accept header check is case-insensitive

()

Source from the content-addressed store, hash-verified

301
302
303async def test_accept_header_case_insensitive():
304 """Test that Accept header check is case-insensitive"""
305 exc = HTTPException(status_code=403)
306 # Mixed case Accept header
307 request = Request(
308 {
309 "type": "http",
310 "path": "/some/path",
311 "headers": [(b"accept", b"Application/JSON")],
312 }
313 )
314 response = await handle_error(request, exc)
315 assert response.status_code == 401
316 assert "WWW-Authenticate" not in response.headers
317
318
319async def test_accept_header_with_multiple_types():

Callers

nothing calls this directly

Calls 2

handle_errorFunction · 0.90
HTTPExceptionClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…