adding cleanup of stale track entries

This commit is contained in:
evilchili
2022-12-10 10:14:06 -08:00
parent 228d44ce98
commit 1a2506742f
9 changed files with 64 additions and 28 deletions
View File
+4
View File
@@ -38,6 +38,10 @@ def test_scanner(monkeypatch, in_memory_db, media):
# replace the filesystem glob with the test fixture generator
monkeypatch.setattr(scanner.MediaScanner, 'find_sources', MagicMock(return_value=media()))
# pretend things exist
monkeypatch.setattr(scanner.Path, 'exists', MagicMock(return_value=True))
monkeypatch.setattr(scanner.Path, 'is_dir', MagicMock(return_value=False))
def mock_loader(path):
return {
'artist': 'foo',
+4
View File
@@ -16,6 +16,10 @@ def response_factory(responses):
return MagicMock(side_effect=responses + ([''] * 10))
def test_commands(cmd_prompt):
assert cmd_prompt.commands.keys() == cmd_prompt.commands.keys()
@pytest.mark.parametrize('inputs, expected', [
(['stats'], 'Database contains 4 playlists'), # match the db fixture
])