MCPcopy Index your code
hub / github.com/python-websockets/websockets / test_not_found

Method test_not_found

tests/sync/test_router.py:115–124  ·  view source on GitHub ↗

Router rejects requests to unknown paths with an HTTP 404 error.

(self)

Source from the content-addressed store, hash-verified

113 )
114
115 def test_not_found(self):
116 """Router rejects requests to unknown paths with an HTTP 404 error."""
117 with run_router(self.url_map) as server:
118 with self.assertRaises(InvalidStatus) as raised:
119 with connect(get_uri(server) + "/n"):
120 self.fail("did not raise")
121 self.assertEqual(
122 str(raised.exception),
123 "server rejected WebSocket connection: HTTP 404",
124 )
125
126 def test_process_request_returning_none(self):
127 """Router supports a process_request returning None."""

Callers

nothing calls this directly

Calls 4

connectFunction · 0.90
run_routerFunction · 0.85
failMethod · 0.80
get_uriFunction · 0.70

Tested by

no test coverage detected