Files
GTI_GERENCIADOR_FISCAL/central/tests/test_historical_conflicts.py
T

10 lines
623 B
Python

def test_missing_historical_identity_is_preserved_not_guessed():
from central.app.ai.historical_conflicts import INSUFFICIENT_EVIDENCE, reconstruct_historical_conflicts
report = reconstruct_historical_conflicts({"products": [{"gtin": "x", "fingerprint": "f"}]}, historical_count=73)
assert report["historical_conflicts_before"] == 73
assert report["historical_conflicts_resolved"] == 0
assert report["historical_conflicts_remaining"] == 73
assert report["classification_counts"] == {INSUFFICIENT_EVIDENCE: 73}
assert all(row["resolution"] == "PRESERVE_CONFLICT" for row in report["conflicts"])