fix: ensure AsyncMock returns awaitable channel in test_initialize
Unit test coverage / pytest (push) Successful in 1m37s
Unit test coverage / pytest (pull_request) Successful in 1m46s
/ build-and-push (push) Successful in 1m46s
Build and Publish Docker Image / build-and-push (push) Has been cancelled

Co-authored-by: aider (openrouter/openai/o3-mini-high) <aider@aider.chat>
This commit is contained in:
Stanislav Hejny
2025-07-18 09:29:54 +01:00
parent a6ca319e92
commit 050b5ddba4
@@ -40,8 +40,9 @@ class TestUserManagementServiceClient(unittest.IsolatedAsyncioTestCase):
mock_connection = MagicMock() mock_connection = MagicMock()
mock_connect.return_value = mock_connection mock_connect.return_value = mock_connection
# Mock channel - use AsyncMock for async methods # Mock channel - create an AsyncMock that returns the channel when awaited
mock_channel = AsyncMock() mock_channel = AsyncMock()
mock_connection.channel = AsyncMock()
mock_connection.channel.return_value = mock_channel mock_connection.channel.return_value = mock_channel
mock_channel.set_qos = AsyncMock() mock_channel.set_qos = AsyncMock()