Files
Movses Aslanyan ccf1783779 Add Phase 0a black-box integration test suite
81 tests across 11 files plus a 5-module harness (load, pg, streams,
containers, payloads), covering all eleven Phase 0 goals and all 13 named
chaos-flag pathologies. Talks to the system only over HTTP, Postgres, Redis,
and the Docker CLI -- no imports of application code. RED-BASELINE.md records
the suite failing red against the empty repo before any implementation
existed; README.md documents the request-contract fields invented to fill
gaps in the spec, measurement methodology, and known-flaky tests.

This suite is a frozen contract from this point forward per CLAUDE.md.
2026-09-05 08:11:59 +03:30

29 lines
839 B
Python

"""The POST /api/transactions request shape this suite assumes.
Neither spec pins down the request field names for creating a transaction --
only the response envelope (phase-0-base-project-spec.md §6.1) is specified.
Since the test suite is the contract, this module fixes the shape Agent B's
implementation must accept. See tests/README.md, "Request contract
assumptions", for the rationale.
"""
def tx_payload(
account_id,
kind="deposit",
amount_minor=1000,
currency="EUR",
merchant_name="Test Merchant",
category_id=None,
):
payload = {
"account_id": account_id,
"kind": kind,
"amount_minor": amount_minor,
"currency": currency,
"merchant_name": merchant_name,
}
if category_id is not None:
payload["category_id"] = category_id
return payload