aboutsummaryrefslogtreecommitdiffstats
path: root/tests/cogs/test_say.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/cogs/test_say.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/cogs/test_say.py b/tests/cogs/test_say.py
index 12f2d2a..13cad40 100644
--- a/tests/cogs/test_say.py
+++ b/tests/cogs/test_say.py
@@ -13,7 +13,7 @@ def say_cog(bot):
13@pytest.mark.asyncio 13@pytest.mark.asyncio
14async def test_say_command(say_cog, mock_channel, mock_guild, bot): 14async def test_say_command(say_cog, mock_channel, mock_guild, bot):
15 ctx = MockApplicationContext(bot=bot, channel=mock_channel, guild=mock_guild) 15 ctx = MockApplicationContext(bot=bot, channel=mock_channel, guild=mock_guild)
16 16
17 with patch.object(ctx, 'send', new_callable=AsyncMock) as mock_send: 17 with patch.object(ctx, 'send', new_callable=AsyncMock) as mock_send:
18 await say_cog.say.callback(say_cog, ctx, "Hello World") 18 await say_cog.say.callback(say_cog, ctx, "Hello World")
19 mock_send.assert_called_once_with(content="Hello World") 19 mock_send.assert_called_once_with(content="Hello World")
@@ -22,7 +22,7 @@ async def test_say_command(say_cog, mock_channel, mock_guild, bot):
22@pytest.mark.asyncio 22@pytest.mark.asyncio
23async def test_say_command_empty_text(say_cog, mock_channel, mock_guild, bot): 23async def test_say_command_empty_text(say_cog, mock_channel, mock_guild, bot):
24 ctx = MockApplicationContext(bot=bot, channel=mock_channel, guild=mock_guild) 24 ctx = MockApplicationContext(bot=bot, channel=mock_channel, guild=mock_guild)
25 25
26 with patch.object(ctx, 'send', new_callable=AsyncMock) as mock_send: 26 with patch.object(ctx, 'send', new_callable=AsyncMock) as mock_send:
27 await say_cog.say.callback(say_cog, ctx, "") 27 await say_cog.say.callback(say_cog, ctx, "")
28 mock_send.assert_called_once_with(content="") 28 mock_send.assert_called_once_with(content="")
@@ -32,7 +32,7 @@ async def test_say_command_empty_text(say_cog, mock_channel, mock_guild, bot):
32async def test_say_command_long_text(say_cog, mock_channel, mock_guild, bot): 32async def test_say_command_long_text(say_cog, mock_channel, mock_guild, bot):
33 ctx = MockApplicationContext(bot=bot, channel=mock_channel, guild=mock_guild) 33 ctx = MockApplicationContext(bot=bot, channel=mock_channel, guild=mock_guild)
34 long_text = "A" * 2000 34 long_text = "A" * 2000
35 35
36 with patch.object(ctx, 'send', new_callable=AsyncMock) as mock_send: 36 with patch.object(ctx, 'send', new_callable=AsyncMock) as mock_send:
37 await say_cog.say.callback(say_cog, ctx, long_text) 37 await say_cog.say.callback(say_cog, ctx, long_text)
38 mock_send.assert_called_once_with(content=long_text) \ No newline at end of file 38 mock_send.assert_called_once_with(content=long_text)