diff options
| author | 2023-04-09 00:34:55 +0300 | |
|---|---|---|
| committer | 2023-04-09 00:34:55 +0300 | |
| commit | c74a3c645d23d22206182813478f6c9b74812ed8 (patch) | |
| tree | 62b648f92c2607a5ed94f90a86b09698d16f8c98 /tests/helpers.py | |
| parent | Fix: use nomination.user_id instead of id in get_or_fetch_member (diff) | |
| parent | Merge pull request #2517 from python-discord/thread_filter (diff) | |
Merge branch 'main' into 2302-activity-in-reviews
Diffstat (limited to 'tests/helpers.py')
| -rw-r--r-- | tests/helpers.py | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/tests/helpers.py b/tests/helpers.py index 1a71f210a..020f1aee5 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -393,15 +393,15 @@ dm_channel_instance = discord.DMChannel(me=me, state=state, data=dm_channel_data  class MockDMChannel(CustomMockMixin, unittest.mock.Mock, HashableMixin):      """ -    A MagicMock subclass to mock TextChannel objects. +    A MagicMock subclass to mock DMChannel objects. -    Instances of this class will follow the specifications of `discord.TextChannel` instances. For +    Instances of this class will follow the specifications of `discord.DMChannel` instances. For      more information, see the `MockGuild` docstring.      """      spec_set = dm_channel_instance      def __init__(self, **kwargs) -> None: -        default_kwargs = {'id': next(self.discord_id), 'recipient': MockUser(), "me": MockUser()} +        default_kwargs = {'id': next(self.discord_id), 'recipient': MockUser(), "me": MockUser(), 'guild': None}          super().__init__(**collections.ChainMap(kwargs, default_kwargs)) @@ -423,7 +423,7 @@ category_channel_instance = discord.CategoryChannel(  class MockCategoryChannel(CustomMockMixin, unittest.mock.Mock, HashableMixin):      def __init__(self, **kwargs) -> None:          default_kwargs = {'id': next(self.discord_id)} -        super().__init__(**collections.ChainMap(default_kwargs, kwargs)) +        super().__init__(**collections.ChainMap(kwargs, default_kwargs))  # Create a Message instance to get a realistic MagicMock of `discord.Message` | 
