Test error on incomplete header.
(self)
| 213 | """Test UWSGIRequest error handling.""" |
| 214 | |
| 215 | def test_incomplete_header(self): |
| 216 | """Test error on incomplete header.""" |
| 217 | unreader = IterUnreader([b'\x00\x00']) # Only 2 bytes |
| 218 | cfg = MockConfig() |
| 219 | |
| 220 | with pytest.raises(InvalidUWSGIHeader) as exc_info: |
| 221 | UWSGIRequest(cfg, unreader, ('127.0.0.1', 12345)) |
| 222 | assert 'incomplete header' in str(exc_info.value) |
| 223 | |
| 224 | def test_incomplete_vars_block(self): |
| 225 | """Test error on truncated vars block.""" |
nothing calls this directly
no test coverage detected