From f8afaae56eec70337d4df3bccb5adf1f44c95407 Mon Sep 17 00:00:00 2001 From: Brett Profitt Date: Tue, 28 May 2024 23:08:32 -0400 Subject: [PATCH] Remove racism Rename inappropriately named test --- tests/test_chat.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/test_chat.py b/tests/test_chat.py index f526b53..32fed2b 100644 --- a/tests/test_chat.py +++ b/tests/test_chat.py @@ -11,8 +11,8 @@ ) -class ChingChangChongCommand(Command): - triggers = ["ching", "chang"] +class OneTwoThreeCommand(Command): + triggers = ["one", "two"] def __init__(self, listen): self.listen = listen @@ -22,26 +22,26 @@ async def handle(self, c: Context) -> bool: return text = c.message.text - if text == "ching": + if text == "one": await asyncio.sleep(1) - await c.send("chang", listen=self.listen) + await c.send("two", listen=self.listen) return - if text == "chang": + if text == "two": await asyncio.sleep(1) - await c.send("chong") + await c.send("three") return # class EnabledListenChatTest(ChatTestCase): # def setUp(self): # super().setUp() -# self.signal_bot.register(ChingChangChongCommand(listen=True)) +# self.signal_bot.register(OneTwoThreeCommand(listen=True)) # @patch("signalbot.SignalAPI.send", new_callable=SendMessagesMock) # @patch("signalbot.SignalAPI.receive", new_callable=ReceiveMessagesMock) # async def test_chat(self, receive_mock, send_mock): -# receive_mock.define(["ching"]) +# receive_mock.define(["one"]) # await self.run_bot() # self.assertEqual(send_mock.call_count, 2) @@ -51,12 +51,12 @@ async def handle(self, c: Context) -> bool: # super().setUp() # group = {"id": "asdf", "name": "Test"} # self.signal_bot._groups_by_internal_id = {"group_id1=": group} -# self.signal_bot.register(ChingChangChongCommand(listen=False)) +# self.signal_bot.register(OneTwoThreeCommand(listen=False)) # @patch("signalbot.SignalAPI.send", new_callable=SendMessagesMock) # @patch("signalbot.SignalAPI.receive", new_callable=ReceiveMessagesMock) # async def test_chat(self, receive_mock, send_mock): -# receive_mock.define(["ching"]) +# receive_mock.define(["one"]) # await self.run_bot() # self.assertEqual(send_mock.call_count, 1) @@ -64,9 +64,9 @@ async def handle(self, c: Context) -> bool: # class DecoratorChatTest(ChatTestCase): # def setUp(self): # super().setUp() -# self.signal_bot.register(ChingChangChongCommand(listen=True)) +# self.signal_bot.register(OneTwoThreeCommand(listen=True)) -# @chat("how are you doing", "ching") +# @chat("how are you doing", "one") # def test_chat(self, query, replies, reactions): # self.assertEqual(replies.call_count, 2)