MCPcopy Create free account
hub / github.com/aio-libs/aiohttp / test_simple_text_unicode_err

Function test_simple_text_unicode_err

tests/test_websocket_parser.py:333–339  ·  view source on GitHub ↗
(parser: PatchableWebSocketReader)

Source from the content-addressed store, hash-verified

331
332
333def test_simple_text_unicode_err(parser: PatchableWebSocketReader) -> None:
334 data = build_frame(b"\xf4\x90\x80\x80", WSMsgType.TEXT)
335
336 with pytest.raises(WebSocketError) as ctx:
337 parser._feed_data(data)
338
339 assert ctx.value.code == WSCloseCode.INVALID_TEXT
340
341
342def test_simple_binary(

Callers

nothing calls this directly

Calls 2

build_frameFunction · 0.85
_feed_dataMethod · 0.45

Tested by

no test coverage detected