fix(test): include 'scanned' in all backfill result assertions
Same 'change shared shape, miss pinned tests' trap as cfa4fb4 — the
prior commit updated only test_backfill_mixed_aggregate; three sibling
tests in the same file also pinned the old {enqueued,ok,regenerated}
shape without 'scanned' and CI bounced.
This commit is contained in:
@@ -125,7 +125,7 @@ def test_backfill_null_path_enqueued(db_sync, tmp_path, monkeypatch):
|
|||||||
)
|
)
|
||||||
|
|
||||||
result = m.backfill_thumbnails()
|
result = m.backfill_thumbnails()
|
||||||
assert result == {"enqueued": 1, "ok": 0, "regenerated": 0}
|
assert result == {"scanned": 1, "enqueued": 1, "ok": 0, "regenerated": 0}
|
||||||
assert delayed == [rec.id]
|
assert delayed == [rec.id]
|
||||||
|
|
||||||
|
|
||||||
@@ -148,7 +148,7 @@ def test_backfill_missing_file_clears_and_enqueues(db_sync, tmp_path, monkeypatc
|
|||||||
|
|
||||||
result = m.backfill_thumbnails()
|
result = m.backfill_thumbnails()
|
||||||
db_sync.expire_all()
|
db_sync.expire_all()
|
||||||
assert result == {"enqueued": 1, "ok": 0, "regenerated": 1}
|
assert result == {"scanned": 1, "enqueued": 1, "ok": 0, "regenerated": 1}
|
||||||
assert delayed == [rec.id]
|
assert delayed == [rec.id]
|
||||||
assert db_sync.get(ImageRecord, rec.id).thumbnail_path is None
|
assert db_sync.get(ImageRecord, rec.id).thumbnail_path is None
|
||||||
|
|
||||||
@@ -170,7 +170,7 @@ def test_backfill_valid_jpeg_skipped(db_sync, tmp_path, monkeypatch):
|
|||||||
|
|
||||||
result = m.backfill_thumbnails()
|
result = m.backfill_thumbnails()
|
||||||
db_sync.expire_all()
|
db_sync.expire_all()
|
||||||
assert result == {"enqueued": 0, "ok": 1, "regenerated": 0}
|
assert result == {"scanned": 1, "enqueued": 0, "ok": 1, "regenerated": 0}
|
||||||
assert delayed == []
|
assert delayed == []
|
||||||
assert db_sync.get(ImageRecord, rec.id).thumbnail_path == str(thumb)
|
assert db_sync.get(ImageRecord, rec.id).thumbnail_path == str(thumb)
|
||||||
|
|
||||||
@@ -191,7 +191,7 @@ def test_backfill_valid_png_skipped(db_sync, tmp_path, monkeypatch):
|
|||||||
)
|
)
|
||||||
|
|
||||||
result = m.backfill_thumbnails()
|
result = m.backfill_thumbnails()
|
||||||
assert result == {"enqueued": 0, "ok": 1, "regenerated": 0}
|
assert result == {"scanned": 1, "enqueued": 0, "ok": 1, "regenerated": 0}
|
||||||
assert delayed == []
|
assert delayed == []
|
||||||
|
|
||||||
|
|
||||||
@@ -212,7 +212,7 @@ def test_backfill_corrupt_magic_clears_and_enqueues(db_sync, tmp_path, monkeypat
|
|||||||
|
|
||||||
result = m.backfill_thumbnails()
|
result = m.backfill_thumbnails()
|
||||||
db_sync.expire_all()
|
db_sync.expire_all()
|
||||||
assert result == {"enqueued": 1, "ok": 0, "regenerated": 1}
|
assert result == {"scanned": 1, "enqueued": 1, "ok": 0, "regenerated": 1}
|
||||||
assert delayed == [rec.id]
|
assert delayed == [rec.id]
|
||||||
assert db_sync.get(ImageRecord, rec.id).thumbnail_path is None
|
assert db_sync.get(ImageRecord, rec.id).thumbnail_path is None
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user