Layers
create_app() takes every adapter as an optional argument, which is exactly
how the tests inject the fakes — no monkeypatching, no network.
The Engrate adapter
The client implements Engrate’s documented Create Schedule endpoint: onePOST /schedule-management/v1/schedules per TSO per delivery date, API
key raw in the authorization header, amounts in MWh per quarter-hour,
direction encoded via out_party/in_party EIC codes. Series mapping:
All market identifiers come from config (
AREA_MARKET_IDS); nothing else in
the service knows Engrate’s shape, so contract changes stay in one file.