Skip to content

Open-source AI teammates in Slack, Teams, Discord, Telegram and Mattermost. Self-host it, with any agent harness and any model.

Fake the Mattermost driver's init_websocket as synchronous in the rename test

Petr Bauchef5c2c4f868b
diff --git a/core/tests/switch_core/bridges/collaboration/test_mattermost_agent_rename.py b/core/tests/switch_core/bridges/collaboration/test_mattermost_agent_rename.py
index 65d90e7db..6c9330f5f 100644
--- a/core/tests/switch_core/bridges/collaboration/test_mattermost_agent_rename.py
+++ b/core/tests/switch_core/bridges/collaboration/test_mattermost_agent_rename.py
@@ -81,10 +81,12 @@ class _RecordingBot:
def login(self) -> None:
return None
- async def init_websocket(self, handler: Any) -> None:
+ def init_websocket(self, handler: Any) -> None:
+ """As `mattermostdriver.Driver.init_websocket`: synchronous, running
+ the thread's current event loop while the socket is open."""
self.handler = handler
self.ready.set()
- await asyncio.Event().wait()
+ asyncio.get_event_loop().run_until_complete(asyncio.Event().wait())
def _adapter(