Skip to content

Commit b2bf526

Browse files
committed
Update information cog test suite to patch get_channel for rules command tests
1 parent c520fb7 commit b2bf526

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/bot/exts/info/test_information.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,9 @@ def setUp(self) -> None:
599599
)
600600
]
601601
self.bot.api_client.get.return_value = self.full_rules
602+
# Patch get_channel to handle the rule alerts being sent to a thread for non-staff (as our mock user is).
603+
self.bot.get_channel.return_value = helpers.MockTextChannel(id=50, name="rules")
604+
602605

603606
async def test_return_none_if_one_rule_number_is_invalid(self):
604607

0 commit comments

Comments
 (0)