()
| 158 | |
| 159 | @pytest.mark.run_loop |
| 160 | def test_start(): |
| 161 | req = make_request('GET', '/') |
| 162 | resp = StreamResponse() |
| 163 | assert resp.keep_alive is None |
| 164 | |
| 165 | with mock.patch('aiohttp.web_reqrep.ResponseImpl'): |
| 166 | msg = yield from resp.prepare(req) |
| 167 | |
| 168 | assert msg.send_headers.called |
| 169 | msg2 = yield from resp.prepare(req) |
| 170 | assert msg is msg2 |
| 171 | |
| 172 | assert resp.keep_alive |
| 173 | |
| 174 | req2 = make_request('GET', '/') |
| 175 | with pytest.raises(RuntimeError): |
| 176 | yield from resp.prepare(req2) |
| 177 | |
| 178 | |
| 179 | @pytest.mark.run_loop |
nothing calls this directly
no test coverage detected