feat: Update player state tests to include previous volume and adjust volume assertions
Some checks failed
Backend CI / lint (push) Failing after 5m0s
Backend CI / test (push) Successful in 3m46s

This commit is contained in:
JSC
2025-08-12 22:58:47 +02:00
parent c69a45c9b4
commit cba1653565
3 changed files with 8 additions and 5 deletions

View File

@@ -337,7 +337,7 @@ class TestSoundEndpoints:
"""Test getting sounds with authentication."""
from app.models.sound import Sound
with patch("app.repositories.sound.SoundRepository.get_by_types") as mock_get:
with patch("app.repositories.sound.SoundRepository.search_and_sort") as mock_get:
# Create mock sounds with all required fields
mock_sound_1 = Sound(
id=1,
@@ -383,7 +383,7 @@ class TestSoundEndpoints:
"""Test getting sounds with type filtering."""
from app.models.sound import Sound
with patch("app.repositories.sound.SoundRepository.get_by_types") as mock_get:
with patch("app.repositories.sound.SoundRepository.search_and_sort") as mock_get:
# Create mock sound with all required fields
mock_sound = Sound(
id=1,
@@ -408,4 +408,5 @@ class TestSoundEndpoints:
assert len(data["sounds"]) == 1
# Verify the repository was called with the correct types
mock_get.assert_called_once_with(["SDB"])
mock_get.assert_called_once()
assert mock_get.call_args.kwargs["sound_types"] == ["SDB"]