diff --git a/recommendations/tests/test_optimiser_functions.py b/recommendations/tests/test_optimiser_functions.py index 40fa56b6..3588877f 100644 --- a/recommendations/tests/test_optimiser_functions.py +++ b/recommendations/tests/test_optimiser_functions.py @@ -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 )