add incremental enrich controls with progress and retry limits
This commit is contained in:
@@ -921,3 +921,52 @@ def test_plan_json_includes_all_required_fields(config, tmp_path):
|
||||
required_op_fields = ["operation_type", "source_path", "destination_path", "reason", "has_conflict", "conflict_reason"]
|
||||
for field in required_op_fields:
|
||||
assert field in operation, f"Missing required operation field: {field}"
|
||||
|
||||
|
||||
def test_movie_rejected_by_review_generates_noop(config):
|
||||
"""Rejected movie should not generate move/rename operation."""
|
||||
video_file = VideoFile(
|
||||
path=Path("/mnt/nas/videos/movie/Movie.2020.mkv"),
|
||||
filename="Movie.2020.mkv",
|
||||
size_bytes=1000000,
|
||||
modified_timestamp=datetime.now(),
|
||||
category="movie"
|
||||
)
|
||||
|
||||
identity = MovieIdentity(
|
||||
title="Movie",
|
||||
year=2020,
|
||||
confidence=0.9,
|
||||
needs_review=False,
|
||||
original_filename="Movie.2020.mkv",
|
||||
review_status="rejected"
|
||||
)
|
||||
|
||||
plan = generate_plan([(video_file, identity)], config)
|
||||
assert plan.operations[0].operation_type == "no-op"
|
||||
assert "rejected" in plan.operations[0].reason.lower()
|
||||
|
||||
|
||||
def test_series_rejected_by_review_generates_noop(config):
|
||||
"""Rejected series should not generate move/rename operation."""
|
||||
video_file = VideoFile(
|
||||
path=Path("/mnt/nas/videos/series/Show.S01E01.mkv"),
|
||||
filename="Show.S01E01.mkv",
|
||||
size_bytes=1000000,
|
||||
modified_timestamp=datetime.now(),
|
||||
category="series"
|
||||
)
|
||||
|
||||
identity = SeriesIdentity(
|
||||
title="Show",
|
||||
season=1,
|
||||
episodes=[1],
|
||||
confidence=0.9,
|
||||
needs_review=False,
|
||||
original_filename="Show.S01E01.mkv",
|
||||
review_status="rejected"
|
||||
)
|
||||
|
||||
plan = generate_plan([(video_file, identity)], config)
|
||||
assert plan.operations[0].operation_type == "no-op"
|
||||
assert "rejected" in plan.operations[0].reason.lower()
|
||||
|
||||
Reference in New Issue
Block a user