Spaces:
Running
Running
File size: 600 Bytes
e56de09 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | import json
from app import keyword_score, aggregate_observations, generate_hypotheses
def test_keyword_score():
t = "uav drone recon ambush"
s = keyword_score(t)
# Expect detect and destroy related words present
assert s["detect"] > 0
assert s["destroy"] > 0
def test_aggregate_and_hypothesis():
obs = [{
"notes": "uav drone recon and reports of ambush",
"equipment": "drone, IED",
"activity": "scouting"
}]
agg = aggregate_observations(obs)
assert agg["count"] == 1
hyps = generate_hypotheses(agg)
assert isinstance(hyps, list)
|