Spaces:
Running
Running
| 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) | |