aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsalmonik <raisersoft@proton.me>2026-05-21 16:15:21 +0200
committersalmonik <raisersoft@proton.me>2026-05-21 16:15:21 +0200
commit95e43df1be6a0d7f4f33d729cfa65a6fb8cbc3a5 (patch)
treeb10ec3648968ad9efdca92ef003aa96927d1bc3b
parentFix zombie voice client after gateway restart (diff)
downloadsenator-sperma-95e43df1be6a0d7f4f33d729cfa65a6fb8cbc3a5.tar.gz
senator-sperma-95e43df1be6a0d7f4f33d729cfa65a6fb8cbc3a5.zip
reqs and test fix
Signed-off-by: salmonik <raisersoft@proton.me>
Diffstat (limited to '')
-rw-r--r--requirements-dev.txt2
-rw-r--r--requirements.txt2
-rw-r--r--tests/cogs/test_music_integration.py26
3 files changed, 16 insertions, 14 deletions
diff --git a/requirements-dev.txt b/requirements-dev.txt
index abba086..6a6279c 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -36,7 +36,7 @@ numpy==2.4.4
36packaging==26.1 36packaging==26.1
37pillow==12.2.0 37pillow==12.2.0
38propcache==0.4.1 38propcache==0.4.1
39py-cord @ file:///home/salmon/Documents/botcode/senator-sperma/pycord 39py-cord==2.8.0
40pycparser==3.0 40pycparser==3.0
41pycryptodomex==3.23.0 41pycryptodomex==3.23.0
42PyNaCl==1.6.2 42PyNaCl==1.6.2
diff --git a/requirements.txt b/requirements.txt
index 81f00ef..d43181f 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -33,7 +33,7 @@ numpy==2.4.4
33packaging==26.1 33packaging==26.1
34pillow==12.2.0 34pillow==12.2.0
35propcache==0.4.1 35propcache==0.4.1
36py-cord @ file:///home/salmon/Documents/botcode/senator-sperma/pycord 36py-cord==2.8.0
37pycparser==3.0 37pycparser==3.0
38pycryptodomex==3.23.0 38pycryptodomex==3.23.0
39PyNaCl==1.6.2 39PyNaCl==1.6.2
diff --git a/tests/cogs/test_music_integration.py b/tests/cogs/test_music_integration.py
index 1c0260a..692e1c1 100644
--- a/tests/cogs/test_music_integration.py
+++ b/tests/cogs/test_music_integration.py
@@ -27,18 +27,20 @@ async def test_music_join_stop(music_cog, bot):
27 ctx.author.voice.channel = MagicMock() 27 ctx.author.voice.channel = MagicMock()
28 ctx.guild = MagicMock() 28 ctx.guild = MagicMock()
29 29
30 voice_client = AsyncMock()
31 ctx.voice_client = voice_client
32
33 # Test join 30 # Test join
34 ctx.author.voice.channel.connect = AsyncMock(return_value=voice_client) 31 mock_vm = MagicMock()
35 with patch.object(ctx, 'respond', new_callable=AsyncMock): 32 mock_vm.connect = AsyncMock()
36 with patch.object(ctx.interaction, 'delete_original_response', new_callable=AsyncMock): 33 with patch('cogs.music.join.get_voice_manager', return_value=mock_vm):
37 await join_cog.join.callback(join_cog, ctx) 34 with patch.object(ctx, 'respond', new_callable=AsyncMock):
38 ctx.author.voice.channel.connect.assert_called_once() 35 with patch.object(ctx.interaction, 'delete_original_response', new_callable=AsyncMock):
36 await join_cog.join.callback(join_cog, ctx)
37 mock_vm.connect.assert_called_once_with(ctx.author.voice.channel)
39 38
40 # Test stop 39 # Test stop
41 with patch.object(ctx, 'respond', new_callable=AsyncMock): 40 mock_vm_stop = MagicMock()
42 with patch.object(ctx.interaction, 'delete_original_response', new_callable=AsyncMock): 41 mock_vm_stop.disconnect = AsyncMock()
43 await stop_cog.stop.callback(stop_cog, ctx) 42 with patch('cogs.music.stop.get_voice_manager', return_value=mock_vm_stop):
44 voice_client.disconnect.assert_called_once() 43 with patch.object(ctx, 'respond', new_callable=AsyncMock):
44 with patch.object(ctx.interaction, 'delete_original_response', new_callable=AsyncMock):
45 await stop_cog.stop.callback(stop_cog, ctx)
46 mock_vm_stop.disconnect.assert_called_once_with(ctx.guild)