fix(coverage): partial coverage when mix of detected+not_detected; add bulk recalculate endpoint
Aegis CI / lint-and-test (push) Waiting to run
Snyk Security Scan / Python vulnerabilities (backend) (push) Waiting to run
Snyk Security Scan / npm vulnerabilities (frontend) (push) Waiting to run
Snyk Security Scan / Docker image vulnerabilities (backend) (push) Waiting to run

This commit is contained in:
kitos
2026-06-18 17:05:15 +02:00
parent a58f9fd357
commit 30ca709c11
3 changed files with 48 additions and 4 deletions
+12
View File
@@ -135,6 +135,18 @@ class TestRecalculateStatus:
tests = [("validated", "not_detected"), ("validated", "not_detected")]
assert e.recalculate_status(tests) == TechniqueStatus.not_covered
def test_all_validated_mix_detected_and_not_detected_gives_partial(self):
e = _entity()
tests = [
("validated", "detected"),
("validated", "detected"),
("validated", "detected"),
("validated", "detected"),
("validated", "detected"),
("validated", "not_detected"),
]
assert e.recalculate_status(tests) == TechniqueStatus.partial
def test_all_validated_no_results_gives_not_covered(self):
e = _entity()
tests = [("validated", None)]