Assert read states are valid.
(self)
| 205 | self.assertEqual(len(json_rpc_reader.buffer), 16347) |
| 206 | |
| 207 | def test_read_state(self): |
| 208 | """ |
| 209 | Assert read states are valid. |
| 210 | """ |
| 211 | test_stream = io.BytesIO(b'Content-Length: 15\r\n\r\n') |
| 212 | json_rpc_reader = jsonrpc.JsonRpcReader(test_stream) |
| 213 | self.assertEqual(json_rpc_reader.read_state, jsonrpc.ReadState.Header) |
| 214 | |
| 215 | json_rpc_reader.read_next_chunk() |
| 216 | header_read = json_rpc_reader.try_read_headers() |
| 217 | |
| 218 | self.assertTrue(header_read) |
| 219 | self.assertEqual(json_rpc_reader.read_state, jsonrpc.ReadState.Content) |
| 220 | |
| 221 | def test_case_insensitive_header(self): |
| 222 | """ |
nothing calls this directly
no test coverage detected