MCPcopy
hub / github.com/encode/starlette / no_state_wrapper

Function no_state_wrapper

tests/test_routing.py:636–638  ·  view source on GitHub ↗
(scope: Scope, receive: Receive, send: Send)

Source from the content-addressed store, hash-verified

634 )
635
636 async def no_state_wrapper(scope: Scope, receive: Receive, send: Send) -> None:
637 del scope["state"]
638 await app(scope, receive, send)
639
640 with pytest.raises(RuntimeError, match='The server does not support "state" in the lifespan scope'):
641 with test_client_factory(no_state_wrapper):

Callers

nothing calls this directly

Calls 1

appFunction · 0.70

Tested by

no test coverage detected