aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helpers.py
diff options
context:
space:
mode:
authorGravatar Izan <[email protected]>2021-09-01 23:11:57 +0100
committerGravatar Izan <[email protected]>2021-09-01 23:11:57 +0100
commit38dc1c69095c35c72a543ed7b08c8dbdad8931c2 (patch)
treedaf47c2d56c35490ccc41e299bf97e88c9bab779 /tests/helpers.py
parentFix role hierarchy check (diff)
Fix tests
Diffstat (limited to 'tests/helpers.py')
-rw-r--r--tests/helpers.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/helpers.py b/tests/helpers.py
index 3978076ed..8443150eb 100644
--- a/tests/helpers.py
+++ b/tests/helpers.py
@@ -235,6 +235,7 @@ class MockMember(CustomMockMixin, unittest.mock.Mock, ColourMixin, HashableMixin
self.roles = [MockRole(name="@everyone", position=1, id=0)]
if roles:
self.roles.extend(roles)
+ self.top_role = max(self.roles)
if 'mention' not in kwargs:
self.mention = f"@{self.name}"
@@ -439,6 +440,7 @@ class MockContext(CustomMockMixin, unittest.mock.MagicMock):
def __init__(self, **kwargs) -> None:
super().__init__(**kwargs)
+ self.me = kwargs.get('me', MockMember())
self.bot = kwargs.get('bot', MockBot())
self.guild = kwargs.get('guild', MockGuild())
self.author = kwargs.get('author', MockMember())