diff options
| author | 2020-08-18 12:15:36 -0700 | |
|---|---|---|
| committer | 2020-08-18 12:15:36 -0700 | |
| commit | 40c6f688eb0e317b1489b069f263f25b202a345c (patch) | |
| tree | 52aca917dc99e946a5ad3cdf4d002856f4635ff1 | |
| parent | Silence tests: more accurately assert the silence cmd schedule a task (diff) | |
Silence tests: remove unnecessary spec_set args
It's not really necessary to set to True when mocking functions.
| -rw-r--r-- | tests/bot/cogs/moderation/test_silence.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/bot/cogs/moderation/test_silence.py b/tests/bot/cogs/moderation/test_silence.py index bc41422ef..5c6d677ca 100644 --- a/tests/bot/cogs/moderation/test_silence.py +++ b/tests/bot/cogs/moderation/test_silence.py @@ -122,7 +122,7 @@ class SilenceCogTests(unittest.IsolatedAsyncioTestCase): @autospec(silence, "SilenceNotifier", pass_mocks=False) async def test_init_cog_rescheduled(self): """`_reschedule_` coroutine was awaited.""" - self.cog._reschedule = mock.create_autospec(self.cog._reschedule, spec_set=True) + self.cog._reschedule = mock.create_autospec(self.cog._reschedule) await self.cog._init_cog() self.cog._reschedule.assert_awaited_once_with() @@ -148,9 +148,9 @@ class RescheduleTests(unittest.IsolatedAsyncioTestCase): def setUp(self): self.bot = MockBot() self.cog = silence.Silence(self.bot) - self.cog._unsilence_wrapper = mock.create_autospec(self.cog._unsilence_wrapper, spec_set=True) + self.cog._unsilence_wrapper = mock.create_autospec(self.cog._unsilence_wrapper) - with mock.patch.object(self.cog, "_reschedule", spec_set=True, autospec=True): + with mock.patch.object(self.cog, "_reschedule", autospec=True): asyncio.run(self.cog._init_cog()) # Populate instance attributes. async def test_skipped_missing_channel(self): |