aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2020-01-02 10:16:54 -0800
committerGravatar MarkKoz <[email protected]>2020-02-12 10:07:48 -0800
commit7c39e44e5c611e01edb0510e23c69dc316ffd184 (patch)
tree650a84dced660d661c294a98e6de21ef7d61c918
parentSync tests: remove guild_roles lists and assign roles to variables (diff)
Sync tests: create separate role test cases for diff and sync tests
-rw-r--r--tests/bot/cogs/sync/test_roles.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/bot/cogs/sync/test_roles.py b/tests/bot/cogs/sync/test_roles.py
index b9a4fe6cd..10818a501 100644
--- a/tests/bot/cogs/sync/test_roles.py
+++ b/tests/bot/cogs/sync/test_roles.py
@@ -7,8 +7,8 @@ from bot.cogs.sync.syncers import RoleSyncer, _Role
from tests import helpers
-class RoleSyncerTests(unittest.TestCase):
- """Tests constructing the roles to synchronize with the site."""
+class RoleSyncerDiffTests(unittest.TestCase):
+ """Tests for determining differences between roles in the DB and roles in the Guild cache."""
def setUp(self):
self.bot = helpers.MockBot()
@@ -95,3 +95,11 @@ class RoleSyncerTests(unittest.TestCase):
expected_diff = ({_Role(**new)}, {_Role(**updated)}, {_Role(**deleted)})
self.assertEqual(actual_diff, expected_diff)
+
+
+class RoleSyncerSyncTests(unittest.TestCase):
+ """Tests for the API requests that sync roles."""
+
+ def setUp(self):
+ self.bot = helpers.MockBot()
+ self.syncer = RoleSyncer(self.bot)