forked from Rockachopa/Timmy-time-dashboard
feat: code quality audit + autoresearch integration + infra hardening (#150)
This commit is contained in:
committed by
GitHub
parent
fd0ede0d51
commit
ae3bb1cc21
@@ -68,6 +68,7 @@ class TestWebSocketManagerBroadcast:
|
||||
@pytest.mark.asyncio
|
||||
async def test_broadcast_trims_history(self):
|
||||
import collections
|
||||
|
||||
mgr = WebSocketManager()
|
||||
mgr._event_history = collections.deque(maxlen=3)
|
||||
for i in range(5):
|
||||
@@ -90,9 +91,7 @@ class TestWebSocketManagerConnect:
|
||||
mgr = WebSocketManager()
|
||||
# Pre-populate history
|
||||
for i in range(3):
|
||||
mgr._event_history.append(
|
||||
WSEvent(event=f"e{i}", data={}, timestamp="t")
|
||||
)
|
||||
mgr._event_history.append(WSEvent(event=f"e{i}", data={}, timestamp="t"))
|
||||
ws = AsyncMock()
|
||||
await mgr.connect(ws)
|
||||
# Should have sent 3 history events
|
||||
|
||||
Reference in New Issue
Block a user