Fixing optimiser tests

This commit is contained in:
Khalim Conn-Kowlessar 2026-03-27 00:52:13 +00:00
parent cab2072ab0
commit 5ab48f3bb4

View file

@ -99,7 +99,8 @@ class TestCalculateGain:
def test_returns_zero_for_already_installed_getting_to_target(self):
body = SimpleNamespace(goal="Increasing EPC", goal_value="C")
p = SimpleNamespace(data={"current-energy-efficiency": "67"}, id=1)
epc_record = SimpleNamespace(current_energy_efficiency=67)
p = SimpleNamespace(epc_record=epc_record, id=1)
fixed_gain = 0
eco_packages = {1: (None, None, None, [])}
already_installed_sap = 2
@ -107,7 +108,6 @@ class TestCalculateGain:
body=body,
p=p,
fixed_gain=fixed_gain,
eco_packages=eco_packages,
already_installed_gain=already_installed_sap
)