Add comprehensive tests for playlist service and refactor socket service tests
- Introduced a new test suite for the PlaylistService covering various functionalities including creation, retrieval, updating, and deletion of playlists. - Added tests for handling sounds within playlists, ensuring correct behavior when adding/removing sounds and managing current playlists. - Refactored socket service tests for improved readability by adjusting function signatures. - Cleaned up unnecessary whitespace in sound normalizer and sound scanner tests for consistency. - Enhanced audio utility tests to ensure accurate hash and size calculations, including edge cases for nonexistent files. - Removed redundant blank lines in cookie utility tests for cleaner code.
This commit is contained in:
@@ -870,7 +870,6 @@ class TestSoundEndpoints:
|
||||
) as mock_normalize_sound,
|
||||
patch("app.repositories.sound.SoundRepository.get_by_id") as mock_get_sound,
|
||||
):
|
||||
|
||||
mock_get_sound.return_value = mock_sound
|
||||
mock_normalize_sound.return_value = mock_result
|
||||
|
||||
@@ -950,7 +949,6 @@ class TestSoundEndpoints:
|
||||
) as mock_normalize_sound,
|
||||
patch("app.repositories.sound.SoundRepository.get_by_id") as mock_get_sound,
|
||||
):
|
||||
|
||||
mock_get_sound.return_value = mock_sound
|
||||
mock_normalize_sound.return_value = mock_result
|
||||
|
||||
@@ -1003,7 +1001,6 @@ class TestSoundEndpoints:
|
||||
) as mock_normalize_sound,
|
||||
patch("app.repositories.sound.SoundRepository.get_by_id") as mock_get_sound,
|
||||
):
|
||||
|
||||
mock_get_sound.return_value = mock_sound
|
||||
mock_normalize_sound.return_value = mock_result
|
||||
|
||||
@@ -1059,7 +1056,6 @@ class TestSoundEndpoints:
|
||||
) as mock_normalize_sound,
|
||||
patch("app.repositories.sound.SoundRepository.get_by_id") as mock_get_sound,
|
||||
):
|
||||
|
||||
mock_get_sound.return_value = mock_sound
|
||||
mock_normalize_sound.return_value = mock_result
|
||||
|
||||
|
||||
Reference in New Issue
Block a user