diff options
author | 2020-05-17 11:52:26 +0100 | |
---|---|---|
committer | 2020-05-17 11:52:26 +0100 | |
commit | 65b02cd242df1a51214a7f1d2019d614b08a623f (patch) | |
tree | 4fc0f80ba10b8b3277de25e237bb2ae78e81ce31 /tests | |
parent | Merge pull request #519 from mathsman5133/help-refactor (diff) | |
parent | Use `Command`-object for `send_help` (diff) |
Merge pull request #949 from python-discord/help-command-fix-invocation
Use `send_help` to ensure that our help command is correctly invoked
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bot/cogs/test_snekbox.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/bot/cogs/test_snekbox.py b/tests/bot/cogs/test_snekbox.py index 1dec0ccaf..8490b02ca 100644 --- a/tests/bot/cogs/test_snekbox.py +++ b/tests/bot/cogs/test_snekbox.py @@ -208,10 +208,9 @@ class SnekboxTests(unittest.IsolatedAsyncioTestCase): async def test_eval_command_call_help(self): """Test if the eval command call the help command if no code is provided.""" - ctx = MockContext() - ctx.invoke = AsyncMock() + ctx = MockContext(command="sentinel") await self.cog.eval_command.callback(self.cog, ctx=ctx, code='') - ctx.invoke.assert_called_once_with(self.bot.get_command("help"), "eval") + ctx.send_help.assert_called_once_with("sentinel") async def test_send_eval(self): """Test the send_eval function.""" |