aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2020-08-16 11:43:33 -0700
committerGravatar MarkKoz <[email protected]>2020-08-16 11:43:33 -0700
commit0a6415068b782d511cafa32002922061a61b9f67 (patch)
tree907a08b7863e78671748f61c90acc8669cdf4828 /tests
parentSilence: remove event and await _get_instance_vars_task directly (diff)
Silence: rename _get_instance_vars to _init_cog
It's a more accurate name since it also reschedules unsilences now.
Diffstat (limited to 'tests')
-rw-r--r--tests/bot/cogs/moderation/test_silence.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/bot/cogs/moderation/test_silence.py b/tests/bot/cogs/moderation/test_silence.py
index ab3d0742a..7c6efbfe4 100644
--- a/tests/bot/cogs/moderation/test_silence.py
+++ b/tests/bot/cogs/moderation/test_silence.py
@@ -83,19 +83,19 @@ class SilenceTests(unittest.IsolatedAsyncioTestCase):
async def test_instance_vars_got_guild(self):
"""Bot got guild after it became available."""
- await self.cog._get_instance_vars()
+ await self.cog._init_cog()
self.bot.wait_until_guild_available.assert_called_once()
self.bot.get_guild.assert_called_once_with(Guild.id)
async def test_instance_vars_got_role(self):
"""Got `Roles.verified` role from guild."""
- await self.cog._get_instance_vars()
+ await self.cog._init_cog()
guild = self.bot.get_guild()
guild.get_role.assert_called_once_with(Roles.verified)
async def test_instance_vars_got_channels(self):
"""Got channels from bot."""
- await self.cog._get_instance_vars()
+ await self.cog._init_cog()
self.bot.get_channel.called_once_with(Channels.mod_alerts)
self.bot.get_channel.called_once_with(Channels.mod_log)
@@ -104,7 +104,7 @@ class SilenceTests(unittest.IsolatedAsyncioTestCase):
"""Notifier was started with channel."""
mod_log = MockTextChannel()
self.bot.get_channel.side_effect = (None, mod_log)
- await self.cog._get_instance_vars()
+ await self.cog._init_cog()
notifier.assert_called_once_with(mod_log)
self.bot.get_channel.side_effect = None