aboutsummaryrefslogtreecommitdiffstats
path: root/tests/cogs/test_music_join.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cogs/test_music_join.py')
-rw-r--r--tests/cogs/test_music_join.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/cogs/test_music_join.py b/tests/cogs/test_music_join.py
index 5fc66f6..3c7ca6e 100644
--- a/tests/cogs/test_music_join.py
+++ b/tests/cogs/test_music_join.py
@@ -22,14 +22,14 @@ async def test_join_command_success(join_cog, mock_channel, mock_guild, bot, moc
22 ctx = MockApplicationContext(bot=bot, channel=mock_channel, guild=mock_guild) 22 ctx = MockApplicationContext(bot=bot, channel=mock_channel, guild=mock_guild)
23 ctx.user = mock_user 23 ctx.user = mock_user
24 ctx.author = mock_user 24 ctx.author = mock_user
25 25
26 mock_voice_channel = MagicMock() 26 mock_voice_channel = MagicMock()
27 mock_voice = MagicMock() 27 mock_voice = MagicMock()
28 mock_voice_channel.connect = AsyncMock(return_value=mock_voice) 28 mock_voice_channel.connect = AsyncMock(return_value=mock_voice)
29 29
30 ctx.author.voice = MagicMock() 30 ctx.author.voice = MagicMock()
31 ctx.author.voice.channel = mock_voice_channel 31 ctx.author.voice.channel = mock_voice_channel
32 32
33 with patch.object(mock_voice_channel, 'connect', new_callable=AsyncMock, return_value=mock_voice): 33 with patch.object(mock_voice_channel, 'connect', new_callable=AsyncMock, return_value=mock_voice):
34 with patch.object(ctx, 'respond', new_callable=AsyncMock): 34 with patch.object(ctx, 'respond', new_callable=AsyncMock):
35 with patch.object(ctx.interaction, 'delete_original_response', new_callable=AsyncMock): 35 with patch.object(ctx.interaction, 'delete_original_response', new_callable=AsyncMock):
@@ -41,13 +41,13 @@ async def test_stop_command_success(stop_cog, mock_channel, mock_guild, bot, moc
41 ctx = MockApplicationContext(bot=bot, channel=mock_channel, guild=mock_guild) 41 ctx = MockApplicationContext(bot=bot, channel=mock_channel, guild=mock_guild)
42 ctx.user = mock_user 42 ctx.user = mock_user
43 ctx.author = mock_user 43 ctx.author = mock_user
44 44
45 mock_voice_client = MagicMock() 45 mock_voice_client = MagicMock()
46 mock_voice_client.disconnect = AsyncMock() 46 mock_voice_client.disconnect = AsyncMock()
47 ctx.voice_client = mock_voice_client 47 ctx.voice_client = mock_voice_client
48 48
49 with patch.object(ctx, 'respond', new_callable=AsyncMock): 49 with patch.object(ctx, 'respond', new_callable=AsyncMock):
50 with patch.object(ctx.interaction, 'delete_original_response', new_callable=AsyncMock): 50 with patch.object(ctx.interaction, 'delete_original_response', new_callable=AsyncMock):
51 await stop_cog.stop.callback(stop_cog, ctx) 51 await stop_cog.stop.callback(stop_cog, ctx)
52 52
53 mock_voice_client.disconnect.assert_called_once() \ No newline at end of file 53 mock_voice_client.disconnect.assert_called_once()