feat: Update player state tests to include previous volume and adjust volume assertions
This commit is contained in:
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user