diff options
Diffstat (limited to '')
| -rw-r--r-- | tests/base.py | 4 | ||||
| -rw-r--r-- | tests/bot/cogs/sync/test_base.py | 2 | ||||
| -rw-r--r-- | tests/bot/cogs/test_snekbox.py | 6 | 
3 files changed, 6 insertions, 6 deletions
| diff --git a/tests/base.py b/tests/base.py index 42174e911..d99b9ac31 100644 --- a/tests/base.py +++ b/tests/base.py @@ -31,7 +31,7 @@ class LoggingTestsMixin:      """      @contextmanager -    def assertNotLogs(self, logger=None, level=None, msg=None): +    def assertNotLogs(self, logger=None, level=None, msg=None):  # noqa: N802          """          Asserts that no logs of `level` and higher were emitted by `logger`. @@ -81,7 +81,7 @@ class LoggingTestsMixin:  class CommandTestCase(unittest.IsolatedAsyncioTestCase):      """TestCase with additional assertions that are useful for testing Discord commands.""" -    async def assertHasPermissionsCheck( +    async def assertHasPermissionsCheck(  # noqa: N802          self,          cmd: commands.Command,          permissions: Dict[str, bool], diff --git a/tests/bot/cogs/sync/test_base.py b/tests/bot/cogs/sync/test_base.py index fe0594efe..6ee9dfda6 100644 --- a/tests/bot/cogs/sync/test_base.py +++ b/tests/bot/cogs/sync/test_base.py @@ -84,7 +84,7 @@ class SyncerSendPromptTests(unittest.IsolatedAsyncioTestCase):                  method.assert_called_once_with(constants.Channels.dev_core) -    async def test_send_prompt_returns_None_if_channel_fetch_fails(self): +    async def test_send_prompt_returns_none_if_channel_fetch_fails(self):          """None should be returned if there's an HTTPException when fetching the channel."""          self.bot.get_channel.return_value = None          self.bot.fetch_channel.side_effect = discord.HTTPException(mock.MagicMock(), "test error!") diff --git a/tests/bot/cogs/test_snekbox.py b/tests/bot/cogs/test_snekbox.py index 9cd7f0154..fd9468829 100644 --- a/tests/bot/cogs/test_snekbox.py +++ b/tests/bot/cogs/test_snekbox.py @@ -89,15 +89,15 @@ class SnekboxTests(unittest.IsolatedAsyncioTestCase):                  self.assertEqual(actual, expected)      @patch('bot.cogs.snekbox.Signals', side_effect=ValueError) -    def test_get_results_message_invalid_signal(self, mock_Signals: Mock): +    def test_get_results_message_invalid_signal(self, mock_signals: Mock):          self.assertEqual(              self.cog.get_results_message({'stdout': '', 'returncode': 127}),              ('Your eval job has completed with return code 127', '')          )      @patch('bot.cogs.snekbox.Signals') -    def test_get_results_message_valid_signal(self, mock_Signals: Mock): -        mock_Signals.return_value.name = 'SIGTEST' +    def test_get_results_message_valid_signal(self, mock_signals: Mock): +        mock_signals.return_value.name = 'SIGTEST'          self.assertEqual(              self.cog.get_results_message({'stdout': '', 'returncode': 127}),              ('Your eval job has completed with return code 127 (SIGTEST)', '') | 
