21 lines
610 B
Python
21 lines
610 B
Python
from app.correlate import correlate
|
|
from app.demo import load_demo
|
|
|
|
|
|
def test_demo_is_deterministic():
|
|
events = load_demo()
|
|
incidents = correlate(events)
|
|
assert len(events) >= 6
|
|
assert incidents
|
|
assert all(incident.evidence_event_ids for incident in incidents)
|
|
|
|
|
|
def test_demo_is_chronological_after_correlation():
|
|
incidents = correlate(load_demo())
|
|
assert incidents == sorted(incidents, key=lambda incident: incident.start)
|
|
|
|
|
|
def test_demo_contains_portfolio_story_events():
|
|
ids = {event.event_id for event in load_demo()}
|
|
assert {12, 7031, 1014, 1000, 1001}.issubset(ids)
|