Add radio event-response-failure message into the logs

This commit is contained in:
Jack Kingsman
2026-02-24 00:09:09 -08:00
parent 27cd3bd710
commit 17e526697f
2 changed files with 27 additions and 0 deletions
+14
View File
@@ -147,6 +147,20 @@ class TestExportAndStorePrivateKey:
assert result is False
assert not has_private_key()
@pytest.mark.asyncio
async def test_no_event_received_raises_runtime_error(self):
"""no_event_received indicates command channel failure and should fail setup."""
mock_mc = MagicMock()
mock_result = MagicMock()
mock_result.type = EventType.ERROR
mock_result.payload = {"reason": "no_event_received"}
mock_mc.commands.export_private_key = AsyncMock(return_value=mock_result)
with pytest.raises(RuntimeError, match="cannot proceed"):
await export_and_store_private_key(mock_mc)
assert not has_private_key()
@pytest.mark.asyncio
async def test_exception_returns_false(self):
"""Exception during export returns False without storing."""