diff options
author | 2021-09-13 02:47:34 +0200 | |
---|---|---|
committer | 2021-09-22 00:16:40 +0200 | |
commit | 056b144a29b73b93e4eaa884edc86f7e1b09d74e (patch) | |
tree | da892c3e6078309525bf405a04182b190f4f5719 /tests | |
parent | Use new command interface that accepts direct content (diff) |
Remove try_get_tag ctx args test
The arguments are now parsed by the command itself so the test would only
check if the mocked message was passed in.
The only case where the errors would fail would be a change to the passed args,
so it'd only restrict development as the tests would need to be changed anyway
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bot/exts/backend/test_error_handler.py | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/tests/bot/exts/backend/test_error_handler.py b/tests/bot/exts/backend/test_error_handler.py index ce59ee5fa..382194a63 100644 --- a/tests/bot/exts/backend/test_error_handler.py +++ b/tests/bot/exts/backend/test_error_handler.py @@ -360,18 +360,6 @@ class TryGetTagTests(unittest.IsolatedAsyncioTestCase): self.assertIsNone(await self.cog.try_get_tag(self.ctx)) self.cog.on_command_error.assert_awaited_once_with(self.ctx, err) - async def test_try_get_tag_ctx_invoke(self): - """Should call `ctx.invoke` with proper args/kwargs.""" - test_cases = ( - ("foo", ("foo", None)), - ("foo bar", ("foo", "bar")), - ) - for message_content, args in test_cases: - self.ctx.reset_mock() - self.ctx.message = MagicMock(content=message_content) - self.assertIsNone(await self.cog.try_get_tag(self.ctx)) - self.ctx.invoke.assert_awaited_once_with(self.tag.get_command, *args) - async def test_dont_call_suggestion_tag_sent(self): """Should never call command suggestion if tag is already sent.""" self.ctx.message = MagicMock(content="foo") |