Router rejects requests to unknown paths with an HTTP 404 error.
(self)
| 101 | ) |
| 102 | |
| 103 | async def test_not_found(self): |
| 104 | """Router rejects requests to unknown paths with an HTTP 404 error.""" |
| 105 | async with route(self.url_map, "localhost", 0) as server: |
| 106 | with self.assertRaises(InvalidStatus) as raised: |
| 107 | async with connect(get_uri(server) + "/n"): |
| 108 | self.fail("did not raise") |
| 109 | self.assertEqual( |
| 110 | str(raised.exception), |
| 111 | "server rejected WebSocket connection: HTTP 404", |
| 112 | ) |
| 113 | |
| 114 | async def test_process_request_function_returning_none(self): |
| 115 | """Router supports a process_request function returning None.""" |