(self)
| 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 |
nothing calls this directly
no test coverage detected