maturity-engine/tests/test_stance_and_readiness.py

17 lines
622 B
Python
Raw Normal View History

from __future__ import annotations
def test_stance_inventory_includes_published_and_absence(engine):
maps = {item.consumer: item for item in engine.stance_maps()}
assert maps["ops-warden"].published is True
assert maps["ops-warden"].path == "ops-warden/pep-stance.yaml"
assert maps["ops-mason"].published is False
assert maps["ops-mason"].path is None
assert maps["ops-mason"].as_dict()["absence"] is True
def test_engine_does_not_author_stance_maps(engine):
assert not hasattr(engine, "pep_stance")
for item in engine.stance_maps():
assert "fail_open" not in (item.path or "")