aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helpers.py
diff options
context:
space:
mode:
authorGravatar Kieran Siek <[email protected]>2021-04-28 17:01:40 +0800
committerGravatar GitHub <[email protected]>2021-04-28 17:01:40 +0800
commitb19b1cf9bc0d32161c281a7c59ae868179e40cf4 (patch)
tree93e911d342f63162b42734987dac426f0b0545b7 /tests/helpers.py
parentMerge pull request #1538 from RohanJnr/suspend_stream (diff)
parentAddress error behavior update. (diff)
Merge pull request #954 from ks129/error-handler-test
Error Handler 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 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())