mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
Fixed hot water cases
This commit is contained in:
parent
d3e3a72c3d
commit
39b083cee9
3 changed files with 13 additions and 3 deletions
|
|
@ -87,3 +87,9 @@ def app():
|
||||||
s3_file_name="cleaned_epc_data/cleaned.bson",
|
s3_file_name="cleaned_epc_data/cleaned.bson",
|
||||||
bucket_name=f"retrofit-data-{ENVIRONMENT}"
|
bucket_name=f"retrofit-data-{ENVIRONMENT}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
save_data_to_s3(
|
||||||
|
data=msgpack.packb(cleaned_data, use_bin_type=True),
|
||||||
|
s3_file_name="cleaned_epc_data/cleaned.bson",
|
||||||
|
bucket_name=f"retrofit-data-{ENVIRONMENT}"
|
||||||
|
)
|
||||||
|
|
|
||||||
|
|
@ -130,13 +130,13 @@ hotwater_cases = [
|
||||||
'thermostat_characteristics': None, 'heating_scope': None, 'energy_recovery': None, 'tariff_type': None,
|
'thermostat_characteristics': None, 'heating_scope': None, 'energy_recovery': None, 'tariff_type': None,
|
||||||
'extra_features': None, 'chp_systems': None, 'distribution_system': None, 'no_system_present': None,
|
'extra_features': None, 'chp_systems': None, 'distribution_system': None, 'no_system_present': None,
|
||||||
'assumed': False, "appliance": None},
|
'assumed': False, "appliance": None},
|
||||||
{'original_description': 'Oil boiler/circulator', 'heater_type': None, 'system_type': 'oil boiler',
|
{'original_description': 'Oil boiler/circulator', 'heater_type': 'oil boiler', 'system_type': None,
|
||||||
'thermostat_characteristics': None, 'heating_scope': None, 'energy_recovery': None, 'tariff_type': None,
|
'thermostat_characteristics': None, 'heating_scope': None, 'energy_recovery': None, 'tariff_type': None,
|
||||||
'extra_features': None, 'chp_systems': None, 'distribution_system': 'circulator', 'no_system_present': None,
|
'extra_features': None, 'chp_systems': None, 'distribution_system': 'circulator', 'no_system_present': None,
|
||||||
'assumed': False, "appliance": None},
|
'assumed': False, "appliance": None},
|
||||||
{'original_description': 'Solid fuel range cooker', 'heater_type': 'solid fuel range cooker', 'system_type': None,
|
{'original_description': 'Solid fuel range cooker', 'heater_type': 'solid fuel range cooker', 'system_type': None,
|
||||||
'thermostat_characteristics': None, 'heating_scope': None, 'energy_recovery': None, 'tariff_type': None,
|
'thermostat_characteristics': None, 'heating_scope': None, 'energy_recovery': None, 'tariff_type': None,
|
||||||
'extra_features': None, 'chp_systems': None, 'distribution_system': 'circulator', 'no_system_present': None,
|
'extra_features': None, 'chp_systems': None, 'distribution_system': None, 'no_system_present': None,
|
||||||
'assumed': False, "appliance": None},
|
'assumed': False, "appliance": None},
|
||||||
{'original_description': 'OGÇÖr brif system, dim thermostat ar y silindr', 'heater_type': None,
|
{'original_description': 'OGÇÖr brif system, dim thermostat ar y silindr', 'heater_type': None,
|
||||||
'system_type': 'from main system', 'thermostat_characteristics': 'no cylinder thermostat', 'heating_scope': None,
|
'system_type': 'from main system', 'thermostat_characteristics': 'no cylinder thermostat', 'heating_scope': None,
|
||||||
|
|
|
||||||
|
|
@ -30,9 +30,13 @@ class TestHotWaterAttributes:
|
||||||
invalid_descriptions = [
|
invalid_descriptions = [
|
||||||
"invalid description",
|
"invalid description",
|
||||||
"description with no known hotwater data_types",
|
"description with no known hotwater data_types",
|
||||||
""
|
|
||||||
]
|
]
|
||||||
|
|
||||||
for description in invalid_descriptions:
|
for description in invalid_descriptions:
|
||||||
with pytest.raises(ValueError):
|
with pytest.raises(ValueError):
|
||||||
HotWaterAttributes(description).process()
|
HotWaterAttributes(description).process()
|
||||||
|
|
||||||
|
def test_empty_description(self):
|
||||||
|
processed = HotWaterAttributes("").process()
|
||||||
|
for _, x in processed.items():
|
||||||
|
assert x is None
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue