diff options
author | 2020-03-17 17:10:16 +0100 | |
---|---|---|
committer | 2020-03-17 17:10:16 +0100 | |
commit | 2803c13c477634ceefe3501ad9cb7c76cfecf450 (patch) | |
tree | b107c9e6ac3b4b5e33fbd85e62a0789b40eb2d8f | |
parent | Fix `test_cog_unload` passing tests with invalid values. (diff) |
Rename `cog_unload` tests.
Previous names were undescriptive from testing phases.
-rw-r--r-- | tests/bot/cogs/moderation/test_silence.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/bot/cogs/moderation/test_silence.py b/tests/bot/cogs/moderation/test_silence.py index febfd584b..07a70e7dc 100644 --- a/tests/bot/cogs/moderation/test_silence.py +++ b/tests/bot/cogs/moderation/test_silence.py @@ -198,7 +198,7 @@ class SilenceTests(unittest.IsolatedAsyncioTestCase): @mock.patch("bot.cogs.moderation.silence.asyncio") @mock.patch.object(Silence, "_mod_alerts_channel", create=True) - def test_cog_unload(self, alert_channel, asyncio_mock): + def test_cog_unload_starts_task(self, alert_channel, asyncio_mock): """Task for sending an alert was created with present `muted_channels`.""" with mock.patch.object(self.cog, "muted_channels"): self.cog.cog_unload() @@ -206,7 +206,7 @@ class SilenceTests(unittest.IsolatedAsyncioTestCase): asyncio_mock.create_task.assert_called_once_with(alert_channel.send()) @mock.patch("bot.cogs.moderation.silence.asyncio") - def test_cog_unload1(self, asyncio_mock): + def test_cog_unload_skips_task_start(self, asyncio_mock): """No task created with no channels.""" self.cog.cog_unload() asyncio_mock.create_task.assert_not_called() |