diff options
author | 2020-04-15 08:18:19 +0300 | |
---|---|---|
committer | 2020-04-15 08:18:19 +0300 | |
commit | 085decd12867f89a0803806928741fe6dd3c76bb (patch) | |
tree | b1de62cf3405996e9b4360834ef274fb24b60a8a /tests/helpers.py | |
parent | (Scheduler): Added removal of infraction in DB, when applying infraction fail... (diff) |
(Test Helpers): Added `__ge__` function to `MockRole` for comparing.
Diffstat (limited to 'tests/helpers.py')
-rw-r--r-- | tests/helpers.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/helpers.py b/tests/helpers.py index 8e13f0f28..227bac95f 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -205,6 +205,10 @@ class MockRole(CustomMockMixin, unittest.mock.Mock, ColourMixin, HashableMixin): """Simplified position-based comparisons similar to those of `discord.Role`.""" return self.position < other.position + def __ge__(self, other): + """Simplified position-based comparisons similar to those of `discord.Role`.""" + return self.position >= other.position + # Create a Member instance to get a realistic Mock of `discord.Member` member_data = {'user': 'lemon', 'roles': [1]} |