Skip to content

Commit 10e88c8

Browse files
Update integration tests for gridpool trades stream
The integration tests for streaming gridpool trades were updated to use the new `gridpool_trades_stream` method. Signed-off-by: Daniel Zullo <[email protected]>
1 parent d53125d commit 10e88c8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

integration_tests/test_api.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -402,16 +402,17 @@ async def test_stream_public_trades(set_up: dict[str, Any]) -> None:
402402
pytest.fail("Streaming timed out, no trade received in 15 seconds")
403403

404404

405-
async def test_stream_gridpool_trades(set_up: dict[str, Any]) -> None:
406-
"""Test stream gridpool trades."""
407-
stream = await set_up["client"].stream_gridpool_trades(GRIDPOOL_ID)
405+
async def test_gridpool_trades_stream(set_up: dict[str, Any]) -> None:
406+
"""Test gridpool trades stream."""
407+
stream = set_up["client"].gridpool_trades_stream(GRIDPOOL_ID)
408+
receiver = stream.new_receiver()
408409

409410
# Create identical orders on opposite sides to try to trigger a trade
410411
await create_test_trade(set_up)
411412

412413
try:
413414
# Stream trades with a 15-second timeout to avoid indefinite hanging
414-
streamed_trade = await asyncio.wait_for(anext(stream), timeout=15)
415+
streamed_trade = await asyncio.wait_for(anext(receiver), timeout=15)
415416
assert streamed_trade is not None, "Failed to receive streamed trade"
416417
except asyncio.TimeoutError:
417418
pytest.fail("Streaming timed out, no trade received in 15 seconds")

0 commit comments

Comments
 (0)