aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/helpers.py4
-rw-r--r--tests/test_helpers.py2
2 files changed, 5 insertions, 1 deletions
diff --git a/tests/helpers.py b/tests/helpers.py
index e6e95c20c..2f0c9b4ad 100644
--- a/tests/helpers.py
+++ b/tests/helpers.py
@@ -325,6 +325,7 @@ class MockBot(CustomMockMixin, unittest.mock.MagicMock):
self.api_client = MockAPIClient(loop=self.loop)
self.http_session = unittest.mock.create_autospec(spec=ClientSession, spec_set=True)
self.stats = unittest.mock.create_autospec(spec=AsyncStatsClient, spec_set=True)
+ self.add_cog = unittest.mock.AsyncMock()
# Create a TextChannel instance to get a realistic MagicMock of `discord.TextChannel`
@@ -337,6 +338,8 @@ channel_data = {
'position': 1,
'nsfw': False,
'last_message_id': 1,
+ 'bitrate': 1337,
+ 'user_limit': 25,
}
state = unittest.mock.MagicMock()
guild = unittest.mock.MagicMock()
@@ -441,6 +444,7 @@ message_data = {
}
state = unittest.mock.MagicMock()
channel = unittest.mock.MagicMock()
+channel.type = discord.ChannelType.text
message_instance = discord.Message(state=state, channel=channel, data=message_data)
diff --git a/tests/test_helpers.py b/tests/test_helpers.py
index 81285e009..f3040b305 100644
--- a/tests/test_helpers.py
+++ b/tests/test_helpers.py
@@ -327,7 +327,7 @@ class MockObjectTests(unittest.TestCase):
def test_spec_propagation_of_mock_subclasses(self):
"""Test if the `spec` does not propagate to attributes of the mock object."""
test_values = (
- (helpers.MockGuild, "region"),
+ (helpers.MockGuild, "features"),
(helpers.MockRole, "mentionable"),
(helpers.MockMember, "display_name"),
(helpers.MockBot, "owner_id"),