diff options
| author | 2020-01-04 10:27:48 -0800 | |
|---|---|---|
| committer | 2020-02-12 10:07:50 -0800 | |
| commit | c4caf865ce677a8d1d827cbd1107338c251ff90b (patch) | |
| tree | 788449d14abc3ea75eb92cb60d89f48f3a6ee07d | |
| parent | Sync tests: test instantiation fails without abstract methods (diff) | |
Sync tests: create a Syncer subclass for testing
| -rw-r--r-- | tests/bot/cogs/sync/test_base.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/bot/cogs/sync/test_base.py b/tests/bot/cogs/sync/test_base.py index 79ec86fee..d38c90410 100644 --- a/tests/bot/cogs/sync/test_base.py +++ b/tests/bot/cogs/sync/test_base.py @@ -4,11 +4,20 @@ from bot.cogs.sync.syncers import Syncer from tests import helpers +class TestSyncer(Syncer): + """Syncer subclass with mocks for abstract methods for testing purposes.""" + + name = "test" + _get_diff = helpers.AsyncMock() + _sync = helpers.AsyncMock() + + class SyncerBaseTests(unittest.TestCase): """Tests for the syncer base class.""" def setUp(self): self.bot = helpers.MockBot() + self.syncer = TestSyncer(self.bot) def test_instantiation_fails_without_abstract_methods(self): """The class must have abstract methods implemented.""" |