fixed broken tests

This commit is contained in:
Khalim Conn-Kowlessar 2024-10-08 16:40:02 +01:00
parent 93a21e5436
commit 08b8124d0c
4 changed files with 129 additions and 217 deletions

View file

@ -337,7 +337,7 @@ class RoofRecommendations:
if proposed_depth >= 300: if proposed_depth >= 300:
new_efficiency = "Very Good" new_efficiency = "Very Good"
else: else:
if self.property.data["walls-energy-eff"] not in ["Good", "Very Good"]: if self.property.data["roof-energy-eff"] not in ["Good", "Very Good"]:
new_efficiency = "Good" new_efficiency = "Good"
else: else:
new_efficiency = "Very Good" new_efficiency = "Very Good"

View file

@ -39,15 +39,8 @@ testing_examples = [
'fixed-lighting-outlets-count': 10.0, 'low-energy-fixed-light-count': 7.0, 'uprn': 100110195416.0, 'fixed-lighting-outlets-count': 10.0, 'low-energy-fixed-light-count': 7.0, 'uprn': 100110195416.0,
'uprn-source': 'Address Matched' 'uprn-source': 'Address Matched'
}, },
"heating_recommendation_descriptions": [ "heating_measure_types": ["air_source_heat_pump"],
"Install an air source heat pump, and upgrade heating controls to Smart Thermostats, room sensors and " "heating_controls_measure_types": ["time_temperature_zone_control"],
"smart radiator valves (time & temperature zone control). The cost includes the £7500 boiler upgrade "
"scheme grant",
],
"heating_controls_recommendation_descriptions": [
"Upgrade heating controls to Smart Thermostats, room sensors and smart radiator valves (time & "
"temperature zone control)"
],
"notes": "This property has a boiler, radiators & mains gas with good efficiency so the only recommendation" "notes": "This property has a boiler, radiators & mains gas with good efficiency so the only recommendation"
"we expect here is for an air source heat pump. The heating controls are a programmer, room thermostat" "we expect here is for an air source heat pump. The heating controls are a programmer, room thermostat"
"and TRVs and so we should expect a TTZC recommendation" "and TRVs and so we should expect a TTZC recommendation"
@ -93,11 +86,10 @@ testing_examples = [
'fixed-lighting-outlets-count': None, 'low-energy-fixed-light-count': None, 'uprn': 10012342725.0, 'fixed-lighting-outlets-count': None, 'low-energy-fixed-light-count': None, 'uprn': 10012342725.0,
'uprn-source': 'Address Matched', 'uprn-source': 'Address Matched',
}, },
"heating_recommendation_descriptions": [ "heating_measure_types": [
"Install high heat retention electric storage heaters. Upgrade heating controls to High Heat Retention " "high_heat_retention_storage_heater",
"Storage Heater Controls"
], ],
"heating_controls_recommendation_descriptions": [], "heating_controls_measure_types": [],
"notes": "This property has electric room heaters and is off gas so a boiler recommendation is not appropriate." "notes": "This property has electric room heaters and is off gas so a boiler recommendation is not appropriate."
"We would expect a high heat retention storage recommendation. The property is a flat and therefore" "We would expect a high heat retention storage recommendation. The property is a flat and therefore"
"we don't expect an air source heat pump recommendation. We also wouldn't expect a specific heating" "we don't expect an air source heat pump recommendation. We also wouldn't expect a specific heating"
@ -144,16 +136,8 @@ testing_examples = [
'tenure': 'owner-occupied', 'fixed-lighting-outlets-count': 6.0, 'low-energy-fixed-light-count': 4.0, 'tenure': 'owner-occupied', 'fixed-lighting-outlets-count': 6.0, 'low-energy-fixed-light-count': 4.0,
'uprn': 100090311351.0, 'uprn-source': 'Address Matched', 'property-type_y': None, 'built-form_y': None, 'uprn': 100090311351.0, 'uprn-source': 'Address Matched', 'property-type_y': None, 'built-form_y': None,
}, },
"heating_recommendation_descriptions": [ "heating_measure_types": ['high_heat_retention_storage_heater', 'air_source_heat_pump'],
'Install high heat retention electric storage heaters. The current electric heaters may be retrofit with ' "heating_controls_measure_types": [],
'high heat retention storage controls however this is dependent on the existing system and may not be '
'possible. Upgrade heating controls to High Heat Retention Storage Heater Controls',
'Install an air source heat pump, and upgrade heating controls to Smart Thermostats, room sensors and '
'smart radiator valves (time & temperature zone control). The cost includes the £7500 boiler upgrade '
'scheme grant'
],
"heating_controls_recommendation_descriptions": [],
"notes": "This test has electric storage heaters with automatic charge control - we recommend hhr storage" "notes": "This test has electric storage heaters with automatic charge control - we recommend hhr storage"
"heaters in this case, but because there are already electic storage heaters in place, we " "heaters in this case, but because there are already electic storage heaters in place, we "
"note, in the description of the recommendation, that this upgrade may be possible by retrofitting" "note, in the description of the recommendation, that this upgrade may be possible by retrofitting"
@ -197,13 +181,10 @@ testing_examples = [
'tenure': 'owner-occupied', 'fixed-lighting-outlets-count': None, 'low-energy-fixed-light-count': None, 'tenure': 'owner-occupied', 'fixed-lighting-outlets-count': None, 'low-energy-fixed-light-count': None,
'uprn': 100021560521.0, 'uprn-source': 'Address Matched', 'uprn': 100021560521.0, 'uprn-source': 'Address Matched',
}, },
"heating_recommendation_descriptions": [ "heating_measure_types": ['boiler_upgrade'],
'Upgrade to a new condensing boiler.' "heating_controls_measure_types": [
], 'roomstat_programmer_trvs',
"heating_controls_recommendation_descriptions": [ 'time_temperature_zone_control',
'Upgrade heating controls to Room thermostat, programmer and TRVs',
'Upgrade heating controls to Smart Thermostats, room sensors and smart radiator valves (time & '
'temperature zone control)'
], ],
"notes": "Because of this property is a maisonette, which already has a boiler (but an inefficient one due to " "notes": "Because of this property is a maisonette, which already has a boiler (but an inefficient one due to "
"the current water heating efficiency) the only recommendation we expect is for " "the current water heating efficiency) the only recommendation we expect is for "
@ -250,12 +231,10 @@ testing_examples = [
'tenure': 'owner-occupied', 'fixed-lighting-outlets-count': 9.0, 'low-energy-fixed-light-count': 5.0, 'tenure': 'owner-occupied', 'fixed-lighting-outlets-count': 9.0, 'low-energy-fixed-light-count': 5.0,
'uprn': 100021936225.0, 'uprn-source': 'Address Matched', 'uprn': 100021936225.0, 'uprn-source': 'Address Matched',
}, },
"heating_recommendation_descriptions": [ "heating_measure_types": [],
], "heating_controls_measure_types": [
"heating_controls_recommendation_descriptions": [ 'roomstat_programmer_trvs',
'Upgrade heating controls to Room thermostat, programmer and TRVs', 'time_temperature_zone_control',
'Upgrade heating controls to Smart Thermostats, room sensors and smart radiator valves (time & '
'temperature zone control)'
], ],
"notes": "Because this property already has a boiler, we don't recommend HHR. We don't recommend an ashp " "notes": "Because this property already has a boiler, we don't recommend HHR. We don't recommend an ashp "
"because the home is mid-terraced. Because the heating controls are " "because the home is mid-terraced. Because the heating controls are "
@ -302,11 +281,10 @@ testing_examples = [
'tenure': 'rental (private)', 'fixed-lighting-outlets-count': 7.0, 'low-energy-fixed-light-count': 6.0, 'tenure': 'rental (private)', 'fixed-lighting-outlets-count': 7.0, 'low-energy-fixed-light-count': 6.0,
'uprn': 43088770.0, 'uprn-source': 'Address Matched', 'uprn': 43088770.0, 'uprn-source': 'Address Matched',
}, },
"heating_recommendation_descriptions": [ "heating_measure_types": [
'Install high heat retention electric storage heaters. Upgrade heating controls to High Heat Retention ' 'high_heat_retention_storage_heater',
'Storage Heater Controls'
], ],
"heating_controls_recommendation_descriptions": [], "heating_controls_measure_types": [],
"notes": "This property is a flat so we don't have an ASHP recommendation. It also doesn't have access to the " "notes": "This property is a flat so we don't have an ASHP recommendation. It also doesn't have access to the "
"mains and so it can't have a gas boiler. We don't expect any controls recommendations" "mains and so it can't have a gas boiler. We don't expect any controls recommendations"
}, },
@ -348,16 +326,10 @@ testing_examples = [
'tenure': 'owner-occupied', 'fixed-lighting-outlets-count': None, 'low-energy-fixed-light-count': None, 'tenure': 'owner-occupied', 'fixed-lighting-outlets-count': None, 'low-energy-fixed-light-count': None,
'uprn': 100080513604.0, 'uprn-source': 'Address Matched' 'uprn': 100080513604.0, 'uprn-source': 'Address Matched'
}, },
"heating_recommendation_descriptions": [ "heating_measure_types": ['air_source_heat_pump'],
'Install an air source heat pump, and upgrade heating controls to Smart Thermostats, room sensors and ' "heating_controls_measure_types": [
'smart radiator valves (time & temperature zone control). The cost includes the £7500 boiler upgrade ' 'roomstat_programmer_trvs',
'scheme grant' 'time_temperature_zone_control',
],
"heating_controls_recommendation_descriptions": [
'Upgrade heating controls to Room thermostat, programmer and TRVs',
'Upgrade heating controls to Smart Thermostats, room sensors and smart radiator valves (time & '
'temperature zone control)'
], ],
"notes": "This has a very efficient boiler and is a detached bungalow, but only has " "notes": "This has a very efficient boiler and is a detached bungalow, but only has "
"Programmer and room thermostat for heating controls so we'd expect an ASHP heating recommendation" "Programmer and room thermostat for heating controls so we'd expect an ASHP heating recommendation"
@ -404,14 +376,12 @@ testing_examples = [
'fixed-lighting-outlets-count': 10.0, 'low-energy-fixed-light-count': 9.0, 'uprn': 100070358594, 'fixed-lighting-outlets-count': 10.0, 'low-energy-fixed-light-count': 9.0, 'uprn': 100070358594,
'uprn-source': 'Address Matched', 'sheating-energy-eff': None, 'sheating-env-eff': None 'uprn-source': 'Address Matched', 'sheating-energy-eff': None, 'sheating-env-eff': None
}, },
"heating_recommendation_descriptions": [ "heating_measure_types": [
'Upgrade to a new condensing boiler. Upgrade heating controls to Room thermostat, programmer and TRVs', 'boiler_upgrade',
'Install high heat retention electric storage heaters. Upgrade heating controls to High Heat Retention ' 'high_heat_retention_storage_heater',
'Storage Heater Controls', 'boiler_upgrade'
'Upgrade to a new condensing boiler. Upgrade heating controls to Smart Thermostats, room sensors and smart '
'radiator valves (time & temperature zone control)'
], ],
"heating_controls_recommendation_descriptions": [], "heating_controls_measure_types": [],
"notes": "This property has assumed electric heating and is mid-terrace house. It has a mains gas connection." "notes": "This property has assumed electric heating and is mid-terrace house. It has a mains gas connection."
"We can recommend a boiler upgrade and high heat retention storage heaters" "We can recommend a boiler upgrade and high heat retention storage heaters"
}, },
@ -453,15 +423,11 @@ testing_examples = [
'fixed-lighting-outlets-count': 42.0, 'low-energy-fixed-light-count': 13.0, 'uprn': 100070985545, 'fixed-lighting-outlets-count': 42.0, 'low-energy-fixed-light-count': 13.0, 'uprn': 100070985545,
'uprn-source': 'Address Matched', 'sheating-energy-eff': None, 'sheating-env-eff': None 'uprn-source': 'Address Matched', 'sheating-energy-eff': None, 'sheating-env-eff': None
}, },
"heating_recommendation_descriptions": [ "heating_measure_types": [
'Install an air source heat pump, and upgrade heating controls to Smart Thermostats, room sensors and ' 'air_source_heat_pump',
'smart radiator valves (time & temperature zone control). The cost includes the £7500 boiler upgrade ' 'high_heat_retention_storage_heater',
'scheme grant',
'Install high heat retention electric storage heaters. Upgrade heating controls to High Heat Retention '
'Storage Heater Controls'
], ],
"heating_controls_recommendation_descriptions": [], "heating_controls_measure_types": [],
"notes": "This property has an oil boiler and doesn't have a mains gas connection so we can only recommend" "notes": "This property has an oil boiler and doesn't have a mains gas connection so we can only recommend"
"an air source heat pump and HHR (since if the home has a non-gas boiler, we recommend HHR)" "an air source heat pump and HHR (since if the home has a non-gas boiler, we recommend HHR)"
}, },
@ -505,17 +471,13 @@ testing_examples = [
'fixed-lighting-outlets-count': None, 'low-energy-fixed-light-count': None, 'uprn': 2465031849, 'fixed-lighting-outlets-count': None, 'low-energy-fixed-light-count': None, 'uprn': 2465031849,
'uprn-source': 'Address Matched', 'sheating-energy-eff': None, 'sheating-env-eff': None 'uprn-source': 'Address Matched', 'sheating-energy-eff': None, 'sheating-env-eff': None
}, },
"heating_recommendation_descriptions": [ "heating_measure_types": [
'Upgrade to a new condensing boiler. Upgrade heating controls to Room thermostat, programmer and TRVs', 'boiler_upgrade',
'Install high heat retention electric storage heaters. Upgrade heating controls to High Heat Retention ' 'high_heat_retention_storage_heater',
'Storage Heater Controls', 'air_source_heat_pump',
'Install an air source heat pump, and upgrade heating controls to Smart Thermostats, room sensors and ' 'boiler_upgrade' # TTZs
'smart radiator valves (time & temperature zone control). The cost includes the £7500 boiler upgrade '
'scheme grant',
'Upgrade to a new condensing boiler. Upgrade heating controls to Smart Thermostats, room sensors and '
'smart radiator valves (time & temperature zone control)'
], ],
"heating_controls_recommendation_descriptions": [], "heating_controls_measure_types": [],
"notes": "This property has room heaters, from the mains gas supply. We recommend a boiler upgrade as" "notes": "This property has room heaters, from the mains gas supply. We recommend a boiler upgrade as"
"well as an air source heat pump and HHR (since the home has a room heater set up)" "well as an air source heat pump and HHR (since the home has a room heater set up)"
}, },
@ -558,14 +520,12 @@ testing_examples = [
'uprn-source': 'Energy Assessor', 'sheating-energy-eff': None, 'sheating-env-eff': None 'uprn-source': 'Energy Assessor', 'sheating-energy-eff': None, 'sheating-env-eff': None
}, },
"heating_recommendation_descriptions": [ "heating_measure_types": [
'Upgrade to a new condensing boiler. Upgrade heating controls to Room thermostat, programmer and TRVs', 'boiler_upgrade',
'Upgrade to a new condensing boiler. Upgrade heating controls to Smart Thermostats, room sensors and smart ' 'boiler_upgrade',
'radiator valves (time & temperature zone control)', 'high_heat_retention_storage_heater',
'Install high heat retention electric storage heaters. Upgrade heating controls to High Heat Retention '
'Storage Heater Controls',
], ],
"heating_controls_recommendation_descriptions": [], "heating_controls_measure_types": [],
"notes": "This property has assumed electric heaters. Boiler upgrade, HHR are recommended. We don't recommend" "notes": "This property has assumed electric heaters. Boiler upgrade, HHR are recommended. We don't recommend"
"an ASHP off of the bat because it's mid-terrace." "an ASHP off of the bat because it's mid-terrace."
}, },
@ -607,14 +567,12 @@ testing_examples = [
'fixed-lighting-outlets-count': 10.0, 'low-energy-fixed-light-count': None, 'uprn': 100071089116, 'fixed-lighting-outlets-count': 10.0, 'low-energy-fixed-light-count': None, 'uprn': 100071089116,
'uprn-source': 'Energy Assessor', 'sheating-energy-eff': None, 'sheating-env-eff': None 'uprn-source': 'Energy Assessor', 'sheating-energy-eff': None, 'sheating-env-eff': None
}, },
"heating_recommendation_descriptions": [ "heating_measure_types": [
'Upgrade to a new condensing boiler. Upgrade heating controls to Room thermostat, programmer and TRVs', 'boiler_upgrade',
'Install high heat retention electric storage heaters. Upgrade heating controls to High Heat Retention ' 'high_heat_retention_storage_heater',
'Storage Heater Controls', 'boiler_upgrade'
'Upgrade to a new condensing boiler. Upgrade heating controls to Smart Thermostats, room sensors and '
'smart radiator valves (time & temperature zone control)'
], ],
"heating_controls_recommendation_descriptions": [], "heating_controls_measure_types": [],
"notes": "This has a form of assumed electric heating and has a mains connection so we recommend HHR, boiler" "notes": "This has a form of assumed electric heating and has a mains connection so we recommend HHR, boiler"
"upgrade and ASHP" "upgrade and ASHP"
}, },
@ -657,15 +615,12 @@ testing_examples = [
'fixed-lighting-outlets-count': None, 'low-energy-fixed-light-count': None, 'uprn': 100030352255, 'fixed-lighting-outlets-count': None, 'low-energy-fixed-light-count': None, 'uprn': 100030352255,
'uprn-source': 'Address Matched', 'sheating-energy-eff': None, 'sheating-env-eff': None 'uprn-source': 'Address Matched', 'sheating-energy-eff': None, 'sheating-env-eff': None
}, },
"heating_recommendation_descriptions": [ "heating_measure_types": [
'Upgrade to a new condensing boiler. Upgrade heating controls to Room thermostat, programmer and TRVs', 'boiler_upgrade',
'Upgrade to a new condensing boiler. Upgrade heating controls to Smart Thermostats, room sensors and smart ' 'boiler_upgrade',
'radiator valves (time & temperature zone control)', 'high_heat_retention_storage_heater',
'Install high heat retention electric storage heaters. The current electric heaters may be retrofit with '
'high heat retention storage controls however this is dependent on the existing system and may not be '
'possible. Upgrade heating controls to High Heat Retention Storage Heater Controls'
], ],
"heating_controls_recommendation_descriptions": [], "heating_controls_measure_types": [],
"notes": "This property already has storage heaters with manual charge control. The home is mid terrace so" "notes": "This property already has storage heaters with manual charge control. The home is mid terrace so"
"the ashp is not suitable" "the ashp is not suitable"
}, },
@ -709,14 +664,11 @@ testing_examples = [
'fixed-lighting-outlets-count': None, 'low-energy-fixed-light-count': None, 'uprn': 10009573249, 'fixed-lighting-outlets-count': None, 'low-energy-fixed-light-count': None, 'uprn': 10009573249,
'uprn-source': 'Address Matched', 'sheating-energy-eff': None, 'sheating-env-eff': None 'uprn-source': 'Address Matched', 'sheating-energy-eff': None, 'sheating-env-eff': None
}, },
"heating_recommendation_descriptions": [ "heating_measure_types": [
'Install high heat retention electric storage heaters. Upgrade heating controls to High Heat Retention ' 'high_heat_retention_storage_heater',
'Storage Heater Controls', 'air_source_heat_pump',
'Install an air source heat pump, and upgrade heating controls to Smart Thermostats, room sensors and '
'smart radiator valves (time & temperature zone control). The cost includes the £7500 boiler upgrade '
'scheme grant'
], ],
"heating_controls_recommendation_descriptions": [], "heating_controls_measure_types": [],
"notes": "This property has an LFG boiler but it doesn't have a mains gas connection so we can only recommend" "notes": "This property has an LFG boiler but it doesn't have a mains gas connection so we can only recommend"
"an air source heat pump and hhr storage" "an air source heat pump and hhr storage"
}, },
@ -758,14 +710,11 @@ testing_examples = [
'fixed-lighting-outlets-count': 8.0, 'low-energy-fixed-light-count': None, 'uprn': 10013181470, 'fixed-lighting-outlets-count': 8.0, 'low-energy-fixed-light-count': None, 'uprn': 10013181470,
'uprn-source': 'Energy Assessor', 'sheating-energy-eff': None, 'sheating-env-eff': None 'uprn-source': 'Energy Assessor', 'sheating-energy-eff': None, 'sheating-env-eff': None
}, },
"heating_recommendation_descriptions": [ "heating_measure_types": [
'Install high heat retention electric storage heaters. Upgrade heating controls to High Heat Retention ' 'high_heat_retention_storage_heater',
'Storage Heater Controls', 'air_source_heat_pump',
'Install an air source heat pump, and upgrade heating controls to Smart Thermostats, room sensors and '
'smart radiator valves (time & temperature zone control). The cost includes the £7500 boiler upgrade '
'scheme grant'
], ],
"heating_controls_recommendation_descriptions": [], "heating_controls_measure_types": [],
"notes": "This property has electric boilers in place, but does not have a mains connection so we don't " "notes": "This property has electric boilers in place, but does not have a mains connection so we don't "
"recommend a boiler upgrade. We recommend HHR and ASHP" "recommend a boiler upgrade. We recommend HHR and ASHP"
}, },
@ -809,14 +758,11 @@ testing_examples = [
'fixed-lighting-outlets-count': 11.0, 'low-energy-fixed-light-count': 7.0, 'uprn': 452047507, 'fixed-lighting-outlets-count': 11.0, 'low-energy-fixed-light-count': 7.0, 'uprn': 452047507,
'uprn-source': 'Address Matched', 'sheating-energy-eff': None, 'sheating-env-eff': None 'uprn-source': 'Address Matched', 'sheating-energy-eff': None, 'sheating-env-eff': None
}, },
"heating_recommendation_descriptions": [ "heating_measure_types": [
'Install an air source heat pump, and upgrade heating controls to Smart Thermostats, room sensors and ' 'air_source_heat_pump',
'smart radiator valves (time & temperature zone control). The cost includes the £7500 boiler upgrade ' 'high_heat_retention_storage_heater'
'scheme grant',
'Install high heat retention electric storage heaters. Upgrade heating controls to High Heat Retention '
'Storage Heater Controls'
], ],
"heating_controls_recommendation_descriptions": [], "heating_controls_measure_types": [],
"notes": "This property has a dual fuel boiler and no mains gas connection. We recommend ASHP and HHR, but" "notes": "This property has a dual fuel boiler and no mains gas connection. We recommend ASHP and HHR, but"
"no gas condensing boiler" "no gas condensing boiler"
}, },
@ -857,14 +803,11 @@ testing_examples = [
'fixed-lighting-outlets-count': 16.0, 'low-energy-fixed-light-count': 4.0, 'uprn': 100030309413, 'fixed-lighting-outlets-count': 16.0, 'low-energy-fixed-light-count': 4.0, 'uprn': 100030309413,
'uprn-source': 'Energy Assessor', 'sheating-energy-eff': None, 'sheating-env-eff': None 'uprn-source': 'Energy Assessor', 'sheating-energy-eff': None, 'sheating-env-eff': None
}, },
"heating_recommendation_descriptions": [ "heating_measure_types": [
'Install an air source heat pump, and upgrade heating controls to Smart Thermostats, room sensors and ' 'air_source_heat_pump',
'smart radiator valves (time & temperature zone control). The cost includes the £7500 boiler upgrade ' 'high_heat_retention_storage_heater',
'scheme grant',
'Install high heat retention electric storage heaters. Upgrade heating controls to High Heat Retention '
'Storage Heater Controls'
], ],
"heating_controls_recommendation_descriptions": [], "heating_controls_measure_types": [],
"notes": "This property has a coal boiler and no mains gas connection. We recommend ASHP and HHR, but" "notes": "This property has a coal boiler and no mains gas connection. We recommend ASHP and HHR, but"
"no gas condensing boiler" "no gas condensing boiler"
}, },
@ -908,15 +851,11 @@ testing_examples = [
'fixed-lighting-outlets-count': None, 'low-energy-fixed-light-count': None, 'uprn': 10007366417, 'fixed-lighting-outlets-count': None, 'low-energy-fixed-light-count': None, 'uprn': 10007366417,
'uprn-source': 'Address Matched', 'sheating-energy-eff': None, 'sheating-env-eff': None 'uprn-source': 'Address Matched', 'sheating-energy-eff': None, 'sheating-env-eff': None
}, },
"heating_recommendation_descriptions": [ "heating_measure_types": [
'Install an air source heat pump, and upgrade heating controls to Smart Thermostats, room sensors and ' 'air_source_heat_pump',
'smart radiator valves (time & temperature zone control). The cost includes the £7500 boiler upgrade ' 'high_heat_retention_storage_heater',
'scheme grant',
'Install high heat retention electric storage heaters. Upgrade heating controls to High Heat Retention '
'Storage Heater Controls'
], ],
"heating_controls_recommendation_descriptions": [], "heating_controls_measure_types": [],
"notes": "This property has a smokeless fuel boiler and no mains gas connection. We recommend ASHP and HHR, but" "notes": "This property has a smokeless fuel boiler and no mains gas connection. We recommend ASHP and HHR, but"
"no gas condensing boiler" "no gas condensing boiler"
}, },
@ -958,15 +897,11 @@ testing_examples = [
'fixed-lighting-outlets-count': None, 'low-energy-fixed-light-count': None, 'uprn': 100030256931, 'fixed-lighting-outlets-count': None, 'low-energy-fixed-light-count': None, 'uprn': 100030256931,
'uprn-source': 'Address Matched', 'sheating-energy-eff': None, 'sheating-env-eff': None 'uprn-source': 'Address Matched', 'sheating-energy-eff': None, 'sheating-env-eff': None
}, },
"heating_recommendation_descriptions": [ "heating_measure_types": [
'Install an air source heat pump, and upgrade heating controls to Smart Thermostats, room sensors and ' 'air_source_heat_pump',
'smart radiator valves (time & temperature zone control). The cost includes the £7500 boiler upgrade ' 'high_heat_retention_storage_heater',
'scheme grant',
'Install high heat retention electric storage heaters. Upgrade heating controls to High Heat Retention '
'Storage Heater Controls'
], ],
"heating_controls_recommendation_descriptions": [], "heating_controls_measure_types": [],
"notes": "This property has a wood pellets boiler and no mains gas connection. We recommend ASHP and HHR, but" "notes": "This property has a wood pellets boiler and no mains gas connection. We recommend ASHP and HHR, but"
"no gas condensing boiler" "no gas condensing boiler"
}, },
@ -1009,11 +944,10 @@ testing_examples = [
'fixed-lighting-outlets-count': None, 'low-energy-fixed-light-count': None, 'uprn': 10000460605, 'fixed-lighting-outlets-count': None, 'low-energy-fixed-light-count': None, 'uprn': 10000460605,
'uprn-source': 'Address Matched', 'sheating-energy-eff': None, 'sheating-env-eff': None 'uprn-source': 'Address Matched', 'sheating-energy-eff': None, 'sheating-env-eff': None
}, },
"heating_recommendation_descriptions": [ "heating_measure_types": [
'Install high heat retention electric storage heaters. Upgrade heating controls to High Heat Retention ' 'high_heat_retention_storage_heater',
'Storage Heater Controls'
], ],
"heating_controls_recommendation_descriptions": [], "heating_controls_measure_types": [],
"notes": "This is an end-terrace house, without mains gas connection, so all we recommend is HHR" "notes": "This is an end-terrace house, without mains gas connection, so all we recommend is HHR"
}, },
{ {
@ -1054,8 +988,8 @@ testing_examples = [
'fixed-lighting-outlets-count': None, 'low-energy-fixed-light-count': None, 'uprn': 100031045596, 'fixed-lighting-outlets-count': None, 'low-energy-fixed-light-count': None, 'uprn': 100031045596,
'uprn-source': 'Address Matched', 'sheating-energy-eff': None, 'sheating-env-eff': None 'uprn-source': 'Address Matched', 'sheating-energy-eff': None, 'sheating-env-eff': None
}, },
"heating_recommendation_descriptions": [], "heating_measure_types": [],
"heating_controls_recommendation_descriptions": [], "heating_controls_measure_types": [],
"notes": "This property already has an ashp. We don't recommend any heating upgrades" "notes": "This property already has an ashp. We don't recommend any heating upgrades"
}, },
{ {
@ -1095,17 +1029,12 @@ testing_examples = [
'tenure': 'Rented (social)', 'fixed-lighting-outlets-count': 11.0, 'low-energy-fixed-light-count': None, 'tenure': 'Rented (social)', 'fixed-lighting-outlets-count': 11.0, 'low-energy-fixed-light-count': None,
'uprn': 90041166, 'uprn-source': 'Energy Assessor', 'sheating-energy-eff': None, 'sheating-env-eff': None 'uprn': 90041166, 'uprn-source': 'Energy Assessor', 'sheating-energy-eff': None, 'sheating-env-eff': None
}, },
"heating_recommendation_descriptions": [ "heating_measure_types": [
'Install an air source heat pump, and upgrade heating controls to Smart Thermostats, room sensors and ' 'air_source_heat_pump',
'smart radiator valves (time & temperature zone control). The cost includes the £7500 boiler upgrade ' 'high_heat_retention_storage_heater'
'scheme grant',
'Install high heat retention electric storage heaters alongside the boiler. The current electric heaters '
'may be retrofit with high heat retention storage controls however this is dependent on the existing '
'system and may not be possible. Upgrade heating controls to High Heat Retention Storage Heater Controls'
], ],
"heating_controls_recommendation_descriptions": [ "heating_controls_measure_types": [
'Upgrade heating controls to Smart Thermostats, room sensors and smart radiator valves (time & ' 'time_temperature_zone_control',
'temperature zone control)'
], ],
"notes": "This property has dual heating. A boiler and electric storage heaters. The heating is efficient so" "notes": "This property has dual heating. A boiler and electric storage heaters. The heating is efficient so"
"we recommend ASHP and HHR. We also recommend upgrading the heating controls for the boiler" "we recommend ASHP and HHR. We also recommend upgrading the heating controls for the boiler"
@ -1147,20 +1076,14 @@ testing_examples = [
'tenure': 'Rented (social)', 'fixed-lighting-outlets-count': 11.0, 'low-energy-fixed-light-count': None, 'tenure': 'Rented (social)', 'fixed-lighting-outlets-count': 11.0, 'low-energy-fixed-light-count': None,
'uprn': 90041166, 'uprn-source': 'Energy Assessor', 'sheating-energy-eff': None, 'sheating-env-eff': None 'uprn': 90041166, 'uprn-source': 'Energy Assessor', 'sheating-energy-eff': None, 'sheating-env-eff': None
}, },
"heating_recommendation_descriptions": [ "heating_measure_types": [
'Install an air source heat pump, and upgrade heating controls to Smart Thermostats, room sensors and ' 'air_source_heat_pump',
'smart radiator valves (time & temperature zone control). The cost includes the £7500 boiler upgrade ' 'boiler_upgrade',
'scheme grant', 'boiler_upgrade+high_heat_retention_storage_heater',
'Upgrade the existing boiler to a new, more efficient condensing boiler. ', 'high_heat_retention_storage_heater'
'Upgrade both the existing boiler to a new condensing boiler and upgrade storage heaters to high heat '
'retention storage heaters.',
'Install high heat retention electric storage heaters alongside the boiler. The current electric heaters '
'may be retrofit with high heat retention storage controls however this is dependent on the existing '
'system and may not be possible. Upgrade heating controls to High Heat Retention Storage Heater Controls'
], ],
"heating_controls_recommendation_descriptions": [ "heating_controls_measure_types": [
'Upgrade heating controls to Smart Thermostats, room sensors and smart radiator valves (time & ' 'time_temperature_zone_control'
'temperature zone control)'
], ],
"notes": "This property is a modified version of the previous dual heating property, where we lower the" "notes": "This property is a modified version of the previous dual heating property, where we lower the"
"starting heating efficiency so that we a combined heating upgrade to both the boiler and the electric" "starting heating efficiency so that we a combined heating upgrade to both the boiler and the electric"
@ -1204,14 +1127,11 @@ testing_examples = [
'tenure': 'rental (social)', 'fixed-lighting-outlets-count': None, 'low-energy-fixed-light-count': None, 'tenure': 'rental (social)', 'fixed-lighting-outlets-count': None, 'low-energy-fixed-light-count': None,
'uprn': 10009574286, 'uprn-source': 'Address Matched', 'sheating-energy-eff': None, 'sheating-env-eff': None 'uprn': 10009574286, 'uprn-source': 'Address Matched', 'sheating-energy-eff': None, 'sheating-env-eff': None
}, },
"heating_recommendation_descriptions": [ "heating_measure_types": [
'Install an air source heat pump, and upgrade heating controls to Smart Thermostats, room sensors and ' 'air_source_heat_pump',
'smart radiator valves (time & temperature zone control). The cost includes the £7500 boiler upgrade ' 'high_heat_retention_storage_heater'
'scheme grant',
'Install high heat retention electric storage heaters. Upgrade heating controls to High Heat Retention '
'Storage Heater Controls'
], ],
"heating_controls_recommendation_descriptions": [], "heating_controls_measure_types": [],
"notes": "This property has anthracite heating without mains. " "notes": "This property has anthracite heating without mains. "
"We recommend ASHP and HHR, but no gas condensing boiler" "We recommend ASHP and HHR, but no gas condensing boiler"
}, },
@ -1254,14 +1174,12 @@ testing_examples = [
'fixed-lighting-outlets-count': 8.0, 'low-energy-fixed-light-count': None, 'uprn': 100031556691, 'fixed-lighting-outlets-count': 8.0, 'low-energy-fixed-light-count': None, 'uprn': 100031556691,
'uprn-source': 'Energy Assessor', 'sheating-energy-eff': None, 'sheating-env-eff': None 'uprn-source': 'Energy Assessor', 'sheating-energy-eff': None, 'sheating-env-eff': None
}, },
"heating_recommendation_descriptions": [ "heating_measure_types": [
'Upgrade to a new condensing boiler. Upgrade heating controls to Room thermostat, programmer and TRVs', 'boiler_upgrade',
'Upgrade to a new condensing boiler. Upgrade heating controls to Smart Thermostats, room sensors and smart ' 'boiler_upgrade',
'radiator valves (time & temperature zone control)', 'high_heat_retention_storage_heater'
'Install high heat retention electric storage heaters. Upgrade heating controls to High Heat Retention '
'Storage Heater Controls'
], ],
"heating_controls_recommendation_descriptions": [], "heating_controls_measure_types": [],
"notes": "This property has room heaters with two different fuel sources, so we recommend HHR, ASHP, and a " "notes": "This property has room heaters with two different fuel sources, so we recommend HHR, ASHP, and a "
"boiler upgrade" "boiler upgrade"
}, },
@ -1302,11 +1220,10 @@ testing_examples = [
'uprn': 100070685908, 'uprn-source': 'Address Matched', 'sheating-energy-eff': None, 'uprn': 100070685908, 'uprn-source': 'Address Matched', 'sheating-energy-eff': None,
'sheating-env-eff': None 'sheating-env-eff': None
}, },
"heating_recommendation_descriptions": [ "heating_measure_types": [
'Install high heat retention electric storage heaters. Upgrade heating controls to High Heat Retention ' 'high_heat_retention_storage_heater'
'Storage Heater Controls'
], ],
"heating_controls_recommendation_descriptions": [], "heating_controls_measure_types": [],
"notes": "This property is a flag, without mains gas connection. Currently has underfloor electric heating" "notes": "This property is a flag, without mains gas connection. Currently has underfloor electric heating"
"so we recommend HHR" "so we recommend HHR"
}, },
@ -1348,17 +1265,13 @@ testing_examples = [
'uprn': 100071209105, 'uprn-source': 'Address Matched', 'sheating-energy-eff': None, 'uprn': 100071209105, 'uprn-source': 'Address Matched', 'sheating-energy-eff': None,
'sheating-env-eff': None 'sheating-env-eff': None
}, },
"heating_recommendation_descriptions": [ "heating_measure_types": [
'Install an air source heat pump, and upgrade heating controls to Smart Thermostats, room sensors and ' 'air_source_heat_pump',
'smart radiator valves (time & temperature zone control). The cost includes the £7500 boiler upgrade ' 'boiler_upgrade',
'scheme grant', 'boiler_upgrade',
'Upgrade to a new condensing boiler. Upgrade heating controls to Room thermostat, programmer and TRVs', 'high_heat_retention_storage_heater'
'Upgrade to a new condensing boiler. Upgrade heating controls to Smart Thermostats, room sensors and smart '
'radiator valves (time & temperature zone control)',
'Install high heat retention electric storage heaters. Upgrade heating controls to High Heat Retention '
'Storage Heater Controls'
], ],
"heating_controls_recommendation_descriptions": [], "heating_controls_measure_types": [],
"notes": "The property has warm air electricaire heating, so we recommend ASHP and HHR. It also has a mains" "notes": "The property has warm air electricaire heating, so we recommend ASHP and HHR. It also has a mains"
"connection so we recommend a gas condensing boiler" "connection so we recommend a gas condensing boiler"
}, },
@ -1402,12 +1315,11 @@ testing_examples = [
'uprn': 100070955137, 'uprn-source': 'Address Matched', 'sheating-energy-eff': None, 'uprn': 100070955137, 'uprn-source': 'Address Matched', 'sheating-energy-eff': None,
'sheating-env-eff': None 'sheating-env-eff': None
}, },
"heating_recommendation_descriptions": [ "heating_measure_types": [
'Upgrade to a new condensing boiler. Upgrade heating controls to Room thermostat, programmer and TRVs', 'boiler_upgrade',
'Upgrade to a new condensing boiler. Upgrade heating controls to Smart Thermostats, room sensors and smart ' 'boiler_upgrade',
'radiator valves (time & temperature zone control)'
], ],
"heating_controls_recommendation_descriptions": [], "heating_controls_measure_types": [],
"notes": "This property has warm air mains gas heating, so we recommend a gas condensing boiler" "notes": "This property has warm air mains gas heating, so we recommend a gas condensing boiler"
} }
] ]

View file

@ -96,19 +96,19 @@ class TestHeatingRecommendations:
recommender.recommend(has_cavity_or_loft_recommendations=False) recommender.recommend(has_cavity_or_loft_recommendations=False)
assert len(recommender.heating_recommendations) == len(test_case["heating_recommendation_descriptions"]) assert len(recommender.heating_recommendations) == len(test_case["heating_measure_types"])
assert ( assert (
len(recommender.heating_control_recommendations) == len(recommender.heating_control_recommendations) ==
len(test_case["heating_controls_recommendation_descriptions"]) len(test_case["heating_controls_measure_types"])
) )
# Check the exact descriptions # Check the exact measure types
assert ( assert (
{x["description"] for x in recommender.heating_recommendations} == {x["measure_type"] for x in recommender.heating_recommendations} ==
set(test_case["heating_recommendation_descriptions"]) set(test_case["heating_measure_types"])
) )
assert ( assert (
{x["description"] for x in recommender.heating_control_recommendations} == {x["measure_type"] for x in recommender.heating_control_recommendations} ==
set(test_case["heating_controls_recommendation_descriptions"]) set(test_case["heating_controls_measure_types"])
) )

View file

@ -35,7 +35,7 @@ class TestRoofRecommendations:
def test_loft_insulation_recommendation_50mm_insulation(self): def test_loft_insulation_recommendation_50mm_insulation(self):
epc_record = EPCRecord() epc_record = EPCRecord()
epc_record.prepared_epc = {"county": "Kent"} epc_record.prepared_epc = {"county": "Kent", "roof-energy-eff": "Very Poor"}
property_instance2 = Property(id=0, address="fake", postcode="fake", epc_record=epc_record) property_instance2 = Property(id=0, address="fake", postcode="fake", epc_record=epc_record)
property_instance2.age_band = "F" property_instance2.age_band = "F"
property_instance2.insulation_floor_area = 100 property_instance2.insulation_floor_area = 100
@ -63,7 +63,7 @@ class TestRoofRecommendations:
assert roof_recommender2.recommendations[0]["parts"][0]["depth"] == 270 assert roof_recommender2.recommendations[0]["parts"][0]["depth"] == 270
epc_record = EPCRecord() epc_record = EPCRecord()
epc_record.prepared_epc = {"county": "Greater London Authority"} epc_record.prepared_epc = {"county": "Greater London Authority", "roof-energy-eff": "Very Poor"}
property_instance3 = Property(id=0, address="fake", postcode="fake", epc_record=epc_record) property_instance3 = Property(id=0, address="fake", postcode="fake", epc_record=epc_record)
property_instance3.age_band = "F" property_instance3.age_band = "F"
property_instance3.insulation_floor_area = 100 property_instance3.insulation_floor_area = 100
@ -89,7 +89,7 @@ class TestRoofRecommendations:
def test_loft_insulation_recommendation_150mm_insulation(self): def test_loft_insulation_recommendation_150mm_insulation(self):
epc_record = EPCRecord() epc_record = EPCRecord()
epc_record.prepared_epc = {"county": "North East Lincolnshire"} epc_record.prepared_epc = {"county": "North East Lincolnshire", "roof-energy-eff": "Good"}
property_instance4 = Property(id=0, address="fake", postcode="fake", epc_record=epc_record) property_instance4 = Property(id=0, address="fake", postcode="fake", epc_record=epc_record)
property_instance4.age_band = "F" property_instance4.age_band = "F"
property_instance4.insulation_floor_area = 100 property_instance4.insulation_floor_area = 100
@ -117,7 +117,7 @@ class TestRoofRecommendations:
assert roof_recommender4.recommendations[0]["parts"][0]["depth"] == 200 assert roof_recommender4.recommendations[0]["parts"][0]["depth"] == 200
epc_record = EPCRecord() epc_record = EPCRecord()
epc_record.prepared_epc = {"county": "Somerset"} epc_record.prepared_epc = {"county": "Somerset", "roof-energy-eff": "Good"}
property_instance5 = Property(id=0, address="fake", postcode="fake", epc_record=epc_record) property_instance5 = Property(id=0, address="fake", postcode="fake", epc_record=epc_record)
property_instance5.age_band = "F" property_instance5.age_band = "F"
property_instance5.insulation_floor_area = 100 property_instance5.insulation_floor_area = 100
@ -189,8 +189,8 @@ class TestRoofRecommendations:
roof_recommender7.recommend(phase=0) roof_recommender7.recommend(phase=0)
assert len(roof_recommender7.recommendations) == 1 assert len(roof_recommender7.recommendations) == 1
assert roof_recommender7.recommendations[0]["new_u_value"] == 0.23 assert roof_recommender7.recommendations[0]["new_u_value"] == 0.24
assert roof_recommender7.recommendations[0]["starting_u_value"] == 1.5 assert roof_recommender7.recommendations[0]["starting_u_value"] == 2.3
assert roof_recommender7.recommendations[0]["description"] == "Insulate room in roof at rafters and re-decorate" assert roof_recommender7.recommendations[0]["description"] == "Insulate room in roof at rafters and re-decorate"
def test_ceiling_insulated_room_in_roof(self): def test_ceiling_insulated_room_in_roof(self):