1 parent ff89bc3 commit 629c244Copy full SHA for 629c244
1 file changed
backend/tests/test_kb_schema.py
@@ -214,9 +214,11 @@ def test_compute_completeness_p02_is_high():
214
@pytest.mark.unit
215
def test_compute_completeness_partial_kb():
216
"""Partial KB with only 1 threshold and no failure patterns scores < 0.5."""
217
- kb = EquipmentKB(
218
- equipment={"manufacturer": "Grundfos"},
219
- thresholds={"vibration_mm_s": {"alert": 4.5}},
+ kb = EquipmentKB.model_validate(
+ {
+ "equipment": {"manufacturer": "Grundfos"},
220
+ "thresholds": {"vibration_mm_s": {"alert": 4.5}},
221
+ }
222
)
223
score = kb.compute_completeness()
224
# 1 threshold out of 3 expected -> 0.5 * (1/3) = ~0.167
0 commit comments