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

Method test_feed_pause

tests/test_websocket_data_queue.py:24–29  ·  view source on GitHub ↗
(self, buffer: WebSocketDataQueue)

Source from the content-addressed store, hash-verified

22
23class TestWebSocketDataQueue:
24 def test_feed_pause(self, buffer: WebSocketDataQueue) -> None:
25 buffer._protocol._reading_paused = False
26 for _ in range(3):
27 buffer.feed_data(WSMessage(data=b"x", type=WSMsgType.BINARY, extra=""), 1)
28
29 assert buffer._protocol.pause_reading.called # type: ignore[attr-defined]
30
31 async def test_resume_on_read(self, buffer: WebSocketDataQueue) -> None:
32 buffer.feed_data(WSMessage(data=b"x", type=WSMsgType.BINARY, extra=""), 1)

Callers

nothing calls this directly

Calls 2

WSMessageClass · 0.90
feed_dataMethod · 0.45

Tested by

no test coverage detected