Tests if a protocol mismatch handshake warns and returns None
(log, message, transport)
| 132 | |
| 133 | |
| 134 | def test_handshake_protocol_unsupported(log, message, transport): |
| 135 | '''Tests if a protocol mismatch handshake warns and returns None''' |
| 136 | proto = 'chat' |
| 137 | message.headers.extend(gen_ws_headers('test')[0]) |
| 138 | |
| 139 | with log('aiohttp.websocket') as ctx: |
| 140 | _, _, _, _, protocol = websocket.do_handshake( |
| 141 | message.method, message.headers, transport, |
| 142 | protocols=[proto]) |
| 143 | |
| 144 | assert protocol is None |
| 145 | assert (ctx.records[-1].msg == |
| 146 | 'Client protocols %r don’t overlap server-known ones %r') |
nothing calls this directly
no test coverage detected