diff options
| author | 2019-10-13 17:15:32 +0200 | |
|---|---|---|
| committer | 2019-10-13 17:15:32 +0200 | |
| commit | 612994ae248e614a9f1712337e0eb7942e0c5f32 (patch) | |
| tree | a05bc796f077c04c0cb4e01c3ce2a79c8fe21778 | |
| parent | Move the `security` cog tests to `unittest`. (diff) | |
Use `MockBot` and `MockContext`.
| -rw-r--r-- | tests/cogs/test_security.py | 6 | 
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.""" | 
