fix: loop_guard GITEA_API default + queue.json validation guard (#951, #952)

This commit is contained in:
hermes
2026-03-22 13:51:59 -04:00
parent bebbe442b4
commit 7f13f540b3
10 changed files with 61 additions and 44 deletions

View File

@@ -6,7 +6,6 @@ Acceptance criteria:
- WebSocket broadcasts include current action and reasoning summary
"""
import asyncio
from unittest.mock import AsyncMock, patch
import pytest
@@ -81,6 +80,7 @@ class TestHeartbeatWithAdapter:
@pytest.mark.asyncio
async def test_on_cycle_callback(self, mock_adapter):
received = []
async def callback(record):
received.append(record)
@@ -145,9 +145,7 @@ class TestHeartbeatBroadcast:
) as mock_ws:
mock_ws.broadcast = AsyncMock()
# Patch the import inside heartbeat
with patch(
"infrastructure.ws_manager.handler.ws_manager"
) as ws_mod:
with patch("infrastructure.ws_manager.handler.ws_manager") as ws_mod:
ws_mod.broadcast = AsyncMock()
hb = Heartbeat(world=mock_adapter)
await hb.run_once()