Add movie-keyed pool index with multi-version movies, ČSFD title bridge, subtitles and miniDLNA library scoping
This commit is contained in:
@@ -942,3 +942,30 @@ class TestMirrorAsIs:
|
||||
"""Neexistující zdroj nic neudělá"""
|
||||
manager = HardlinkManager(tmp_path / "out")
|
||||
assert manager.mirror_as_is(tmp_path / "missing", "Seriály") == (0, 0)
|
||||
|
||||
|
||||
class TestRemoveMirror:
|
||||
"""Removing a whole mirrored library (or one bucket entry) from the output."""
|
||||
|
||||
def test_removes_a_whole_mirrored_folder(self, tmp_path):
|
||||
output = tmp_path / "out"
|
||||
(output / "Dokumenty" / "sub").mkdir(parents=True)
|
||||
(output / "Dokumenty" / "sub" / "clip.mp4").write_bytes(b"x")
|
||||
manager = HardlinkManager(output)
|
||||
|
||||
assert manager.remove_mirror("Dokumenty") is True
|
||||
assert not (output / "Dokumenty").exists()
|
||||
|
||||
def test_removes_one_bucket_entry_by_compound_name(self, tmp_path):
|
||||
output = tmp_path / "out"
|
||||
(output / "Seriály" / "Show A").mkdir(parents=True)
|
||||
(output / "Seriály" / "Show B").mkdir(parents=True)
|
||||
manager = HardlinkManager(output)
|
||||
|
||||
assert manager.remove_mirror("Seriály/Show A") is True
|
||||
assert not (output / "Seriály" / "Show A").exists()
|
||||
assert (output / "Seriály" / "Show B").exists() # sibling untouched
|
||||
|
||||
def test_missing_target_returns_false(self, tmp_path):
|
||||
manager = HardlinkManager(tmp_path / "out")
|
||||
assert manager.remove_mirror("Nope") is False
|
||||
|
||||
Reference in New Issue
Block a user