diff --git a/acapy_agent/core/tests/test_conductor.py b/acapy_agent/core/tests/test_conductor.py index 5cc61c9e2e..2dc5fbaa73 100644 --- a/acapy_agent/core/tests/test_conductor.py +++ b/acapy_agent/core/tests/test_conductor.py @@ -1,3 +1,4 @@ +import asyncio from unittest import IsolatedAsyncioTestCase import pytest @@ -1208,7 +1209,9 @@ async def test_print_invite_connection(self): test_profile, DIDInfo("did", "verkey", metadata={}, method=SOV, key_type=ED25519), ), - ), self.assertLogs(level="INFO") as captured, mock.patch.object( + ), self.assertLogs( + "acapy_agent.core.conductor", level="INFO" + ) as captured, mock.patch.object( test_module, "OutboundTransportManager", autospec=True ) as mock_outbound_mgr: mock_outbound_mgr.return_value.registered_transports = { @@ -1218,6 +1221,7 @@ async def test_print_invite_connection(self): await conductor.start() await conductor.stop() + await asyncio.sleep(0.1) # Allow log handlers to flush value = captured.output assert any("http://localhost?oob=" in msg for msg in value) assert any("http://localhost?c_i=" in msg for msg in value)