feat: усилить reconciler для lab4
This commit is contained in:
@@ -6,6 +6,7 @@ from app.tools.reconcile_attachments import AttachmentSnapshot, build_plan
|
||||
|
||||
|
||||
def test_plan_classifies_both_sides_and_protects_fresh_items():
|
||||
"""Классифицирует orphan/missing и защищает свежие расхождения."""
|
||||
now = datetime.now(timezone.utc)
|
||||
cutoff = now - timedelta(minutes=1)
|
||||
correct_key = f'originals/{uuid4()}'
|
||||
@@ -35,6 +36,7 @@ def test_plan_classifies_both_sides_and_protects_fresh_items():
|
||||
|
||||
|
||||
def test_failed_metadata_still_protects_its_object_from_orphan_cleanup():
|
||||
"""Проверяет защиту объекта существующей failed-metadata."""
|
||||
now = datetime.now(timezone.utc)
|
||||
key = f'originals/{uuid4()}'
|
||||
failed = AttachmentSnapshot(uuid4(), key, 'failed', now - timedelta(hours=2))
|
||||
|
||||
Reference in New Issue
Block a user