Open-source AI teammates in Slack, Teams, Discord, Telegram and Mattermost. Self-host it, with any agent harness and any model.
Python agent-orchestrationaiai-agentschatopsdiscordlangchainmcpmicrosoft-teamsmulti-agentopen-sourceopenaiself-hostedslack
Let the tests' stand-ins for MessageStore.create take its new keyword
Abel Dantas0da9956fbfc8
diff --git a/core/tests/switch_core/delivery/test_join_during_decision.py b/core/tests/switch_core/delivery/test_join_during_decision.pyindex 56dbbd1ab..e3e09ba3d 100644--- a/core/tests/switch_core/delivery/test_join_during_decision.py+++ b/core/tests/switch_core/delivery/test_join_during_decision.py@@ -45,11 +45,11 @@ async def test_a_mention_numbered_after_the_agents_arrival_reaches_it(joined = asyncio.Event()create = MessageStore.create- async def create_after_the_join(self, session, message, attachments): # type: ignore[no-untyped-def]+ async def create_after_the_join(self, session, message, attachments, **kwargs): # type: ignore[no-untyped-def]if message.body == BODY:decided.set()await joined.wait()- return await create(self, session, message, attachments)+ return await create(self, session, message, attachments, **kwargs)monkeypatch.setattr(MessageStore, "create", create_after_the_join)@@ -112,7 +112,7 @@ async def test_a_join_that_began_first_but_committed_during_the_decision(joined = asyncio.Event()create = MessageStore.create- async def interleave(self, session, message, attachments): # type: ignore[no-untyped-def]+ async def interleave(self, session, message, attachments, **kwargs): # type: ignore[no-untyped-def]if (message.event_type == "m.room.member"and message.sender_client_id == client.id@@ -124,7 +124,7 @@ async def test_a_join_that_began_first_but_committed_during_the_decision(elif message.body == BODY2:mention_decided.set()await joined.wait()- return await create(self, session, message, attachments)+ return await create(self, session, message, attachments, **kwargs)monkeypatch.setattr(MessageStore, "create", interleave)diff --git a/core/tests/switch_core/delivery/test_removed_from_room.py b/core/tests/switch_core/delivery/test_removed_from_room.pyindex 6c566d0e3..7ca19a9af 100644--- a/core/tests/switch_core/delivery/test_removed_from_room.py+++ b/core/tests/switch_core/delivery/test_removed_from_room.py@@ -163,11 +163,11 @@ async def test_a_message_decided_before_the_removal_stores_nothing_after_it(removed = asyncio.Event()create = MessageStore.create- async def create_after_the_removal(self, session, message, attachments): # type: ignore[no-untyped-def]+ async def create_after_the_removal(self, session, message, attachments, **kwargs): # type: ignore[no-untyped-def]if message.room_id == left.id and message.body == "@fixer late":decided.set()await removed.wait()- return await create(self, session, message, attachments)+ return await create(self, session, message, attachments, **kwargs)monkeypatch.setattr(MessageStore, "create", create_after_the_removal)sending = asyncio.create_task(process.say(left, "@fixer late", sender=alice))@@ -228,11 +228,11 @@ async def test_a_row_decided_before_the_removal_leaves_the_agent_nothing_to_say(removed = asyncio.Event()create = MessageStore.create- async def create_after_the_removal(self, session, message, attachments): # type: ignore[no-untyped-def]+ async def create_after_the_removal(self, session, message, attachments, **kwargs): # type: ignore[no-untyped-def]if message.room_id == left.id and message.sender_client_id == alice.id:decided.set()await removed.wait()- return await create(self, session, message, attachments)+ return await create(self, session, message, attachments, **kwargs)monkeypatch.setattr(MessageStore, "create", create_after_the_removal)sending = asyncio.create_task(write(process, left, alice))