aboutsummaryrefslogtreecommitdiffstats
path: root/solo-tool-project/test/solo_tool_songs_integrationtest.py
diff options
context:
space:
mode:
authorEddy Pedroni <epedroni@pm.me>2025-02-26 18:09:06 +0100
committerEddy Pedroni <epedroni@pm.me>2025-02-26 18:25:41 +0100
commit3c065ceded2a58d5aadbcf64417f2cfc92268a08 (patch)
tree95e965feeb2313dd657c8335c57b16fffefff9a0 /solo-tool-project/test/solo_tool_songs_integrationtest.py
parent0821b21761a6d47ac1d34c2142365dbaa361b79e (diff)
Refactor fixtures, introduce song pool argument
Diffstat (limited to 'solo-tool-project/test/solo_tool_songs_integrationtest.py')
-rw-r--r--solo-tool-project/test/solo_tool_songs_integrationtest.py20
1 files changed, 2 insertions, 18 deletions
diff --git a/solo-tool-project/test/solo_tool_songs_integrationtest.py b/solo-tool-project/test/solo_tool_songs_integrationtest.py
index 092ea93..6030d19 100644
--- a/solo-tool-project/test/solo_tool_songs_integrationtest.py
+++ b/solo-tool-project/test/solo_tool_songs_integrationtest.py
@@ -1,22 +1,6 @@
import pytest
-from solo_tool.solo_tool import SoloTool
-from player_mock import Player as MockPlayer
-
-@pytest.fixture
-def mockPlayer():
- return MockPlayer()
-
-@pytest.fixture
-def uut(mockPlayer):
- return SoloTool(player=mockPlayer)
-
-@pytest.fixture
-def testSongs():
- return [
- "test.flac",
- "test.mp3"
- ]
+from fixtures import soloTool as uut, songPool, mockPlayer, testSongs
def test_songSelectionFlow(uut, mockPlayer, testSongs):
# Initially, song list is empty and no song is selected
@@ -33,7 +17,7 @@ def test_songSelectionFlow(uut, mockPlayer, testSongs):
# Subsequently added songs are not selected automatically
# Song list order is addition order
for i, song in enumerate(testSongs[1:]):
- uut.addSong(testSongs[1])
+ uut.addSong(song)
assert uut.song == 0
assert mockPlayer.currentSong == testSongs[0]
assert uut.songs == testSongs[0:i + 2]