diff options
| author | 2021-05-04 11:39:24 +0300 | |
|---|---|---|
| committer | 2021-05-04 11:39:24 +0300 | |
| commit | eaba4d3e9df320b3086cdc6f357525c2a53c1482 (patch) | |
| tree | 12452ea1c9b292bfbd11435ec57c32cdf174c8d5 /tests/helpers.py | |
| parent | Removed opinions from text. (diff) | |
| parent | Merge pull request #1556 from ToxicKidz/mod-ping-off-embed-timestamp (diff) | |
Merge branch 'main' into str-join-tag
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 496363ae3..e3dc5fe5b 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -385,6 +385,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): @@ -402,6 +403,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()) |