aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helpers.py
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2023-06-14 15:58:20 +0100
committerGravatar Chris Lovering <[email protected]>2023-06-21 20:42:42 +0100
commit5f182ed25315f349b4c450b8462988d5a0c214e0 (patch)
treeaef98a9c7e4c40cb68149072d8b2c71a03ece2c8 /tests/helpers.py
parentWrite custom get_role func for MockMember (diff)
Update MockAttachment data with new expected fields
Diffstat (limited to 'tests/helpers.py')
-rw-r--r--tests/helpers.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/helpers.py b/tests/helpers.py
index b7e5cc871..26ac42697 100644
--- a/tests/helpers.py
+++ b/tests/helpers.py
@@ -525,7 +525,18 @@ class MockInteraction(CustomMockMixin, unittest.mock.MagicMock):
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())
+attachment_data = {
+ "id": 1,
+ "size": 14,
+ "filename": "jchrist.png",
+ "url": "https://google.com",
+ "proxy_url": "https://google.com",
+ "waveform": None,
+}
+attachment_instance = discord.Attachment(
+ data=attachment_data,
+ state=unittest.mock.MagicMock(),
+)
class MockAttachment(CustomMockMixin, unittest.mock.MagicMock):