diff options
author | 2021-05-09 00:33:01 +0300 | |
---|---|---|
committer | 2021-05-09 00:33:01 +0300 | |
commit | 3c6682648ef68ff04796d8b6d991ebc0ca2aea9e (patch) | |
tree | 4920b2581d738e4c1b4027b072931a47ae40a344 /tests/helpers.py | |
parent | Uses Itertools Product To Reduce Nesting (diff) | |
parent | Merge branch 'main' into voicechannel-mute (diff) |
Merge remote-tracking branch 'fork/voicechannel-mute' into voicechannel-mute
Diffstat (limited to 'tests/helpers.py')
-rw-r--r-- | tests/helpers.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/helpers.py b/tests/helpers.py index 529664e67..86cc635f8 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -404,6 +404,7 @@ message_instance = discord.Message(state=state, channel=channel, data=message_da # Create a Context instance to get a realistic MagicMock of `discord.ext.commands.Context` context_instance = Context(message=unittest.mock.MagicMock(), prefix=unittest.mock.MagicMock()) +context_instance.invoked_from_error_handler = None class MockContext(CustomMockMixin, unittest.mock.MagicMock): @@ -421,6 +422,7 @@ class MockContext(CustomMockMixin, unittest.mock.MagicMock): self.guild = kwargs.get('guild', MockGuild()) self.author = kwargs.get('author', MockMember()) self.channel = kwargs.get('channel', MockTextChannel()) + self.invoked_from_error_handler = kwargs.get('invoked_from_error_handler', False) attachment_instance = discord.Attachment(data=unittest.mock.MagicMock(id=1), state=unittest.mock.MagicMock()) |