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

Function test_add_headers_upgrade_websocket

tests/test_protocol.py:147–154  ·  view source on GitHub ↗
(transport)

Source from the content-addressed store, hash-verified

145
146
147def test_add_headers_upgrade_websocket(transport):
148 msg = protocol.Response(transport, 200)
149
150 msg.add_headers(('upgrade', 'test'))
151 assert [] == list(msg.headers)
152
153 msg.add_headers(('upgrade', 'websocket'))
154 assert [('UPGRADE', 'websocket')] == list(msg.headers.items())
155
156
157def test_add_headers_connection_keepalive(transport):

Callers

nothing calls this directly

Calls 1

add_headersMethod · 0.80

Tested by

no test coverage detected