MCPcopy Index your code
hub / github.com/zappa/Zappa / test_get_handler_fallback

Method test_get_handler_fallback

tests/test_websocket.py:83–92  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

81 self.assertEqual(result, {"statusCode": 200, "body": "connected"})
82
83 def test_get_handler_fallback(self):
84 from zappa.websocket import get_handler, on_message
85
86 @on_message
87 def handle_msg(event, context):
88 return {"statusCode": 200}
89
90 # Unknown route should fall back to $default
91 handler = get_handler("$unknown")
92 self.assertIs(handler, handle_msg)
93
94 def test_get_handler_returns_none_when_empty(self):
95 from zappa.websocket import get_handler

Callers

nothing calls this directly

Calls 1

get_handlerFunction · 0.90

Tested by

no test coverage detected