aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/cogs/test_security.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/cogs/test_security.py b/tests/cogs/test_security.py
index 6c646ae70..efa7a50b1 100644
--- a/tests/cogs/test_security.py
+++ b/tests/cogs/test_security.py
@@ -5,6 +5,7 @@ from unittest.mock import MagicMock
from discord.ext.commands import NoPrivateMessage
from bot.cogs import security
+from tests.helpers import MockBot, MockContext
class SecurityCogTests(unittest.TestCase):
@@ -12,10 +13,9 @@ class SecurityCogTests(unittest.TestCase):
def setUp(self):
"""Attach an instance of the cog to the class for tests."""
- self.bot = MagicMock()
+ self.bot = MockBot()
self.cog = security.Security(self.bot)
- self.ctx = MagicMock()
- self.ctx.author = MagicMock()
+ self.ctx = MockContext()
def test_check_additions(self):
"""The cog should add its checks after initialization."""