From 3c72b27441e3ebd225e594ff389ffb730ce0a6e1 Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Mon, 23 Jun 2025 02:04:40 +0100 Subject: Update information cog test suite to patch get_channel for rules command tests --- tests/bot/exts/info/test_information.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/bot/exts/info/test_information.py b/tests/bot/exts/info/test_information.py index e90291f62..13a82f9b8 100644 --- a/tests/bot/exts/info/test_information.py +++ b/tests/bot/exts/info/test_information.py @@ -599,6 +599,9 @@ class RuleCommandTests(unittest.IsolatedAsyncioTestCase): ) ] self.bot.api_client.get.return_value = self.full_rules + # Patch get_channel to handle the rule alerts being sent to a thread for non-staff (as our mock user is). + self.bot.get_channel.return_value = helpers.MockTextChannel(id=50, name="rules") + async def test_return_none_if_one_rule_number_is_invalid(self): -- cgit v1.2.3