aboutsummaryrefslogtreecommitdiffstats
path: root/solo-tool-project/test/session_manager_unittest.py
diff options
context:
space:
mode:
authorEddy Pedroni <epedroni@pm.me>2025-07-17 15:14:38 +0200
committerEddy Pedroni <epedroni@pm.me>2025-07-17 15:24:48 +0200
commit8fdbcd3b98f5bf5479e2a67e40f5746b184908d3 (patch)
tree8366c7647a1874ea75aec4c2c8a9bdf60e9054fb /solo-tool-project/test/session_manager_unittest.py
parent89dcddce5e215400150232befddebc83f45d64d8 (diff)
Purge all mention of song pool
Diffstat (limited to 'solo-tool-project/test/session_manager_unittest.py')
-rw-r--r--solo-tool-project/test/session_manager_unittest.py27
1 files changed, 8 insertions, 19 deletions
diff --git a/solo-tool-project/test/session_manager_unittest.py b/solo-tool-project/test/session_manager_unittest.py
index bb40fdf..690bec0 100644
--- a/solo-tool-project/test/session_manager_unittest.py
+++ b/solo-tool-project/test/session_manager_unittest.py
@@ -3,7 +3,7 @@ from json import loads
import os
from solo_tool.session_manager import getSessionManager, _FileSystemSessionManager, _FileBrowserSessionManager
-from fixtures import songPool, soloTool, mockPlayer, testSongs, sessionPath
+from fixtures import soloTool, mockPlayer, testSongs, sessionPath
@pytest.fixture
def testSessionFile(sessionPath, testSongs):
@@ -23,8 +23,8 @@ def testSessionFile(sessionPath, testSongs):
return sessionFile
@pytest.fixture
-def sessionManager(sessionPath, songPool):
- return getSessionManager(str(songPool), str(sessionPath))
+def sessionManager(sessionPath):
+ return getSessionManager(str(sessionPath))
def test_loadSession(sessionManager, mockPlayer, testSessionFile):
sessions = sessionManager.getSessions()
@@ -64,20 +64,9 @@ def test_loadAndSaveEmptySession(sessionManager, sessionPath, soloTool, tmp_path
assert reloadedTool.songs == []
-def test_uploadSong(sessionManager, songPool, tmp_path):
- song = tmp_path / "song-to-be-uploaded.mp3"
- song.touch()
-
- expected = songPool / "song-to-be-uploaded.mp3"
- assert not expected.exists()
-
- with open(song, "rb") as f:
- sessionManager.addSong("song-to-be-uploaded.mp3", f)
- assert expected.exists()
-
def test_sessionManagerFactory():
- assert type(getSessionManager("", "/some_absolute_dir")) is _FileSystemSessionManager
- assert type(getSessionManager("", "file:///some_dir_with_protocol")) is _FileSystemSessionManager
- assert type(getSessionManager("", "some_relative_dir")) is _FileSystemSessionManager
- assert type(getSessionManager("", "http://some_server")) is _FileBrowserSessionManager
- assert type(getSessionManager("", "https://some_secure_server")) is _FileBrowserSessionManager
+ assert type(getSessionManager("/some_absolute_dir")) is _FileSystemSessionManager
+ assert type(getSessionManager("file:///some_dir_with_protocol")) is _FileSystemSessionManager
+ assert type(getSessionManager("some_relative_dir")) is _FileSystemSessionManager
+ assert type(getSessionManager("http://some_server")) is _FileBrowserSessionManager
+ assert type(getSessionManager("https://some_secure_server")) is _FileBrowserSessionManager