MCPcopy
hub / github.com/aio-libs/aiohttp / test_compression_no_accept

Function test_compression_no_accept

tests/test_web_response.py:222–233  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

220
221@pytest.mark.run_loop
222def test_compression_no_accept():
223 req = make_request('GET', '/')
224 resp = StreamResponse()
225 assert not resp.chunked
226
227 assert not resp.compression
228 resp.enable_compression()
229 assert resp.compression
230
231 with mock.patch('aiohttp.web_reqrep.ResponseImpl'):
232 msg = yield from resp.prepare(req)
233 assert not msg.add_compression_filter.called
234
235
236@pytest.mark.run_loop

Callers

nothing calls this directly

Calls 5

enable_compressionMethod · 0.95
prepareMethod · 0.95
StreamResponseClass · 0.90
patchMethod · 0.80
make_requestFunction · 0.70

Tested by

no test coverage detected