diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-04-01 17:57:43 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-04-01 17:57:43 +0900 |
| commit | 61b2a193e79d74783bb1ad4c3a8ccb6ead0f24c0 (patch) | |
| tree | 374ad93df6d393715809192ff40b1754d56de39b /shared/tests | |
| parent | 13a9b2c80bb3eb1353cf2d49bdbf7d0dbd858ccc (diff) | |
fix: lint cleanup after medium priority tasks
Diffstat (limited to 'shared/tests')
| -rw-r--r-- | shared/tests/test_broker.py | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/shared/tests/test_broker.py b/shared/tests/test_broker.py index c33f6ec..9be84b0 100644 --- a/shared/tests/test_broker.py +++ b/shared/tests/test_broker.py @@ -109,9 +109,7 @@ async def test_broker_read_group(): mock_redis = AsyncMock() mock_redis.xreadgroup = AsyncMock( - return_value=[ - (b"stream", [(b"1-0", {b"payload": b'{"type": "test"}'})]) - ] + return_value=[(b"stream", [(b"1-0", {b"payload": b'{"type": "test"}'})])] ) broker = RedisBroker.__new__(RedisBroker) broker._redis = mock_redis @@ -142,9 +140,7 @@ async def test_broker_read_pending(): mock_redis = AsyncMock() mock_redis.xreadgroup = AsyncMock( - return_value=[ - (b"stream", [(b"1-0", {b"payload": b'{"type": "pending"}'})]) - ] + return_value=[(b"stream", [(b"1-0", {b"payload": b'{"type": "pending"}'})])] ) broker = RedisBroker.__new__(RedisBroker) broker._redis = mock_redis @@ -154,9 +150,7 @@ async def test_broker_read_pending(): assert messages[0][0] == "1-0" assert messages[0][1] == {"type": "pending"} # Verify it uses "0" (not ">") to read pending - mock_redis.xreadgroup.assert_called_once_with( - "group", "consumer", {"stream": "0"}, count=10 - ) + mock_redis.xreadgroup.assert_called_once_with("group", "consumer", {"stream": "0"}, count=10) @pytest.mark.asyncio @@ -165,11 +159,7 @@ async def test_broker_read_pending_skips_empty_fields(): from shared.broker import RedisBroker mock_redis = AsyncMock() - mock_redis.xreadgroup = AsyncMock( - return_value=[ - (b"stream", [(b"1-0", {})]) - ] - ) + mock_redis.xreadgroup = AsyncMock(return_value=[(b"stream", [(b"1-0", {})])]) broker = RedisBroker.__new__(RedisBroker) broker._redis = mock_redis |
