dodil/erp-brick-gl

DODIL ERP brick: general ledger

tests/test_scenarios.py

"""The scenario catalogue runs in process: the whole composition, each brick on its own SQLite, real ASGI and a real MCP session."""
import pathlib
import sys

sys.path.insert(0, str(pathlib.Path(__file__).parent / "scenarios"))

import catalogue  # noqa: E402


def test_the_catalogue_runs_in_process():
    from erp_platform.scenarios.inprocess import InProcessRunner
    runner = InProcessRunner(catalogue.CAT)
    runner.start()
    try:
        results = runner.run_all()
    finally:
        runner.stop()
    assert [(r.id, r.outcome, r.message[:400]) for r in results if r.outcome != "passed"] == []