aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bot/exts/moderation/test_incidents.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bot/exts/moderation/test_incidents.py')
-rw-r--r--tests/bot/exts/moderation/test_incidents.py15
1 files changed, 4 insertions, 11 deletions
diff --git a/tests/bot/exts/moderation/test_incidents.py b/tests/bot/exts/moderation/test_incidents.py
index cbf7f7bcf..ccc842050 100644
--- a/tests/bot/exts/moderation/test_incidents.py
+++ b/tests/bot/exts/moderation/test_incidents.py
@@ -3,7 +3,7 @@ import enum
import logging
import typing as t
import unittest
-from unittest.mock import AsyncMock, MagicMock, call, patch
+from unittest.mock import AsyncMock, MagicMock, Mock, call, patch
import aiohttp
import discord
@@ -11,15 +11,8 @@ import discord
from bot.constants import Colours
from bot.exts.moderation import incidents
from tests.helpers import (
- MockAsyncWebhook,
- MockAttachment,
- MockBot,
- MockMember,
- MockMessage,
- MockReaction,
- MockRole,
- MockTextChannel,
- MockUser,
+ MockAsyncWebhook, MockAttachment, MockBot, MockMember, MockMessage, MockReaction, MockRole, MockTextChannel,
+ MockUser
)
@@ -379,7 +372,7 @@ class TestArchive(TestIncidents):
# Define our own `incident` to be archived
incident = MockMessage(
content="this is an incident",
- author=MockUser(name="author_name", avatar_url="author_avatar"),
+ author=MockUser(name="author_name", display_avatar=Mock(url="author_avatar")),
id=123,
)
built_embed = MagicMock(discord.Embed, id=123) # We patch `make_embed` to return this