From cd8ed8bc5793985df2c1692072a932ceee517b95 Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 8 Jul 2026 02:13:35 +0200 Subject: OPEN THE RUST GATES Signed-off-by: salmonik --- tests/cogs/test_music_join.py | 56 ------------------------------------------- 1 file changed, 56 deletions(-) delete mode 100644 tests/cogs/test_music_join.py (limited to 'tests/cogs/test_music_join.py') diff --git a/tests/cogs/test_music_join.py b/tests/cogs/test_music_join.py deleted file mode 100644 index b40d93a..0000000 --- a/tests/cogs/test_music_join.py +++ /dev/null @@ -1,56 +0,0 @@ -import pytest -from unittest.mock import AsyncMock, patch, MagicMock -from conftest import MockApplicationContext - - -@pytest.fixture -def join_cog(bot): - from cogs.music.join import Join - cog = Join(bot) - return cog - - -@pytest.fixture -def stop_cog(bot): - from cogs.music.stop import Stop - cog = Stop(bot) - return cog - - -@pytest.mark.asyncio -async def test_join_command_success(join_cog, mock_channel, mock_guild, bot, mock_user): - ctx = MockApplicationContext(bot=bot, channel=mock_channel, guild=mock_guild) - ctx.user = mock_user - ctx.author = mock_user - - mock_voice_channel = MagicMock() - ctx.author.voice = MagicMock() - ctx.author.voice.channel = mock_voice_channel - - with patch('cogs.music.join.get_voice_manager') as mock_get_vm: - mock_vm = MagicMock() - mock_vm.connect = AsyncMock() - mock_get_vm.return_value = mock_vm - - with patch.object(ctx, 'respond', new_callable=AsyncMock): - with patch.object(ctx.interaction, 'delete_original_response', new_callable=AsyncMock): - await join_cog.join.callback(join_cog, ctx) - mock_vm.connect.assert_called_once_with(mock_voice_channel) - - -@pytest.mark.asyncio -async def test_stop_command_success(stop_cog, mock_channel, mock_guild, bot, mock_user): - ctx = MockApplicationContext(bot=bot, channel=mock_channel, guild=mock_guild) - ctx.user = mock_user - ctx.author = mock_user - - with patch('cogs.music.stop.get_voice_manager') as mock_get_vm: - mock_vm = MagicMock() - mock_vm.disconnect = AsyncMock() - mock_get_vm.return_value = mock_vm - - with patch.object(ctx, 'respond', new_callable=AsyncMock): - with patch.object(ctx.interaction, 'delete_original_response', new_callable=AsyncMock): - await stop_cog.stop.callback(stop_cog, ctx) - - mock_vm.disconnect.assert_called_once_with(mock_guild) -- cgit v1.2.3