Model/tests/infrastructure
Khalim Conn-Kowlessar ac77624d67 test(pv-battery): pin SAP cost-neutrality on export-capable standard tariff
End-to-end API-path regression pin for the battery behaviour validated by
the user-simulated Elmhurst worksheet pair (cert 001431 "simulated case
35/36", 5 kWh, export-capable, mains-gas, standard tariff). The official
SAP rating ("10a. Fuel costs - using Table 12 prices") values PV used-in-
dwelling and PV exported identically at 13.19 p/kWh (export code 60 ==
import code 30, ADR-0010), so a battery only redistributes PV between two
equally-priced lines: worksheet PV credit (252) = -455.6458 and SAP (258)
= 88.0859 are IDENTICAL with/without the battery (ΔSAP = 0).

Two tests over the committed RdSAP-21.0.1 corpus:
- standard tariff (meter 2): toggling the battery holds continuous SAP
  EXACTLY constant, while at least one cert's primary energy DOES respond
  (proving the App-M1 §3c β-split is wired, not a dropped battery).
- off-peak tariff (meter != 2): the battery STRICTLY raises SAP, because
  self-consumed PV displaces high-rate import (15.29) above the 13.19
  export credit — confirming the standard-tariff neutrality is a price
  coincidence, not a no-op.

Guards table_32 export price (code 60) and the battery β-split against
silent regression. Complements the unit-level β tests in
test_photovoltaic.py.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 09:51:34 +00:00
..
chatgpt moved classifier data transformation to an easy one 2026-06-01 14:53:34 +00:00
epc_client test(pv-battery): pin SAP cost-neutrality on export-capable standard tariff 2026-06-14 09:51:34 +00:00
magic_plan define MagicPlanConfig class to get environment variables 2026-06-05 15:46:32 +00:00
postgres UploadedFile, FileTypeEnum, FileSourceEnum importable from infrastructure.postgres.uploaded_file_table 🟥 2026-06-09 11:42:53 +00:00
solar GoogleSolarApi translates BuildingInsightsNotFoundError to sentinel dict 🟩 2026-06-01 16:28:47 +00:00
__init__.py get rid of comments 2026-05-20 13:21:11 +00:00
conftest.py get rid of comments 2026-05-20 13:21:11 +00:00
test_address2uprn_queue_client.py tests framework completed 2026-05-20 14:00:19 +00:00
test_csv_s3_client.py updated rdsap option; seperated s3 location in infrastrucutre; added open ai api 2026-05-22 14:00:33 +00:00
test_s3_client.py updated rdsap option; seperated s3 location in infrastrucutre; added open ai api 2026-05-22 14:00:33 +00:00
test_s3_uri.py updated rdsap option; seperated s3 location in infrastrucutre; added open ai api 2026-05-22 14:00:33 +00:00
test_sqs_client.py tests framework completed 2026-05-20 14:00:19 +00:00