aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2020-01-08 16:42:01 -0800
committerGravatar MarkKoz <[email protected]>2020-02-12 10:07:52 -0800
commitd020e5ebaf72448b015351b550ea3c82bde3c61f (patch)
tree87bba3d444a9c1b2d6b253c0a99ec873533f2ee2
parentSync tests: test the return value of _send_prompt (diff)
Sync tests: create a separate test case for _send_prompt tests
-rw-r--r--tests/bot/cogs/sync/test_base.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/tests/bot/cogs/sync/test_base.py b/tests/bot/cogs/sync/test_base.py
index 4c3eae1b3..af15b544b 100644
--- a/tests/bot/cogs/sync/test_base.py
+++ b/tests/bot/cogs/sync/test_base.py
@@ -22,6 +22,18 @@ class SyncerBaseTests(unittest.TestCase):
def setUp(self):
self.bot = helpers.MockBot()
+
+ def test_instantiation_fails_without_abstract_methods(self):
+ """The class must have abstract methods implemented."""
+ with self.assertRaisesRegex(TypeError, "Can't instantiate abstract class"):
+ Syncer(self.bot)
+
+
+class SyncerSendPromptTests(unittest.TestCase):
+ """Tests for sending the sync confirmation prompt."""
+
+ def setUp(self):
+ self.bot = helpers.MockBot()
self.syncer = TestSyncer(self.bot)
def mock_get_channel(self):
@@ -49,11 +61,6 @@ class SyncerBaseTests(unittest.TestCase):
return mock_channel, mock_message
- def test_instantiation_fails_without_abstract_methods(self):
- """The class must have abstract methods implemented."""
- with self.assertRaisesRegex(TypeError, "Can't instantiate abstract class"):
- Syncer(self.bot)
-
def test_send_prompt_edits_and_returns_message(self):
"""The given message should be edited to display the prompt and then should be returned."""
msg = helpers.MockMessage()