aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2019-12-31 16:52:45 -0800
committerGravatar MarkKoz <[email protected]>2020-02-12 10:07:47 -0800
commit28c7ce0465bafc0e07432a94d6f388938a2b3b4d (patch)
treeee1e3277cacf2a09302069eab869c25fabc10aaa /tests
parentSync tests: add fixture to create a guild with roles (diff)
Sync tests: fix creation of MockRoles
Role was being accessed like a class when it is actually a dict.
Diffstat (limited to 'tests')
-rw-r--r--tests/bot/cogs/sync/test_roles.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/bot/cogs/sync/test_roles.py b/tests/bot/cogs/sync/test_roles.py
index 5ae475b2a..b1fe500cd 100644
--- a/tests/bot/cogs/sync/test_roles.py
+++ b/tests/bot/cogs/sync/test_roles.py
@@ -20,9 +20,10 @@ class RoleSyncerTests(unittest.TestCase):
guild.roles = []
for role in roles:
- role.colour = discord.Colour(role.colour)
- role.permissions = discord.Permissions(role.permissions)
- guild.roles.append(helpers.MockRole(**role))
+ mock_role = helpers.MockRole(**role)
+ mock_role.colour = discord.Colour(role["colour"])
+ mock_role.permissions = discord.Permissions(role["permissions"])
+ guild.roles.append(mock_role)
return guild