diff options
| author | salmonik <raisersoft@proton.me> | 2026-05-20 15:40:18 +0200 |
|---|---|---|
| committer | salmonik <raisersoft@proton.me> | 2026-05-20 15:40:18 +0200 |
| commit | 4663f260b55de0975661fda1c00f60d2ca6e4506 (patch) | |
| tree | b649850859595542f8e7916a5513e0840e911318 /tests/cogs/test_music_audio.py | |
| parent | Fix TTS and AI voice playback bugs (diff) | |
| download | senator-sperma-4663f260b55de0975661fda1c00f60d2ca6e4506.tar.gz senator-sperma-4663f260b55de0975661fda1c00f60d2ca6e4506.zip | |
Clean up consumers: replace polling with VoiceManager.play_source()
- cron.py: replace while-is_playing polling with VoiceManager.play_source()
- vclogs.py: replace while-is_playing polling with VoiceManager.play_source()
- stop.py: use VoiceManager.disconnect() instead of raw voice_client
- join.py: use VoiceManager.connect() instead of raw channel.connect()
- voice.py: add back join_by_channel_id() convenience method
- Tests: update for new VoiceManager method names and signatures
Diffstat (limited to '')
| -rw-r--r-- | tests/cogs/test_music_audio.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/cogs/test_music_audio.py b/tests/cogs/test_music_audio.py index 705f1b3..150ad5d 100644 --- a/tests/cogs/test_music_audio.py +++ b/tests/cogs/test_music_audio.py | |||
| @@ -59,7 +59,7 @@ async def test_prepare_file_source_absolute_path(): | |||
| 59 | async def test_prepare_source_url(): | 59 | async def test_prepare_source_url(): |
| 60 | from cogs.music.audio_playback import AudioPlaybackManager | 60 | from cogs.music.audio_playback import AudioPlaybackManager |
| 61 | 61 | ||
| 62 | source, _, is_url = await AudioPlaybackManager.prepare_source(MagicMock(), "https://example.com/stream") | 62 | source, _, is_url = await AudioPlaybackManager.prepare_source("https://example.com/stream") |
| 63 | 63 | ||
| 64 | assert is_url == True | 64 | assert is_url == True |
| 65 | assert source == "https://example.com/stream" | 65 | assert source == "https://example.com/stream" |
| @@ -70,7 +70,7 @@ async def test_prepare_source_local_file(): | |||
| 70 | from cogs.music.audio_playback import AudioPlaybackManager | 70 | from cogs.music.audio_playback import AudioPlaybackManager |
| 71 | 71 | ||
| 72 | with patch('os.path.exists', return_value=True): | 72 | with patch('os.path.exists', return_value=True): |
| 73 | source, display_name, is_url = await AudioPlaybackManager.prepare_source(MagicMock(), "/tmp/test.mp3") | 73 | source, display_name, is_url = await AudioPlaybackManager.prepare_source("/tmp/test.mp3") |
| 74 | 74 | ||
| 75 | assert is_url == False | 75 | assert is_url == False |
| 76 | assert display_name == "test" | 76 | assert display_name == "test" |
