mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
fixed unit tests for mainheat attributes
This commit is contained in:
parent
f1c59157ed
commit
ab146d1749
3 changed files with 149 additions and 143 deletions
|
|
@ -17,7 +17,7 @@ class MainHeatAttributes(Definitions):
|
|||
"exhaust source heat pump",
|
||||
"community heat pump",
|
||||
]
|
||||
FUEL_TYPES = ["electric", "mains gas", "wood logs", "LPG", "coal", "oil", "wood pellets", "anthracite",
|
||||
FUEL_TYPES = ["electric", "mains gas", "wood logs", "coal", "oil", "wood pellets", "anthracite",
|
||||
"dual fuel mineral and wood", "smokeless fuel", "lpg", "b30k"]
|
||||
DISTRIBUTION_SYSTEMS = ["radiators", "fan coil units", "pipes in screed above insulation",
|
||||
"pipes in insulated timber floor", "pipes in concrete slab"]
|
||||
|
|
@ -45,7 +45,7 @@ class MainHeatAttributes(Definitions):
|
|||
"pwmp gwres sygçön tarddu yn yr awyr, rheiddiaduron, trydan": "air source heat pump, radiators, electric",
|
||||
"gwresogyddion ystafell, nwy prif gyflenwad": "room heaters, mains gas",
|
||||
"bwyler a rheiddiaduron, dau danwydd mwynau a choed": "boiler and radiators, dual fuel mineral and wood",
|
||||
"gwresogyddion ystafell, dau danwydd mwynau a choed": "room heaters, dual fuel (mineral and wood)",
|
||||
"gwresogyddion ystafell, dau danwydd mwynau a choed": "room heaters, dual fuel mineral and wood",
|
||||
"pwmp gwres sygçön tarddu yn y ddaear, dan y llawr, trydan": "ground source heat pump, underfloor, electric",
|
||||
"gwresogi dan y llawr trydan": "electric underfloor heating",
|
||||
# This descripton is slightly unclear & was repeated
|
||||
|
|
@ -53,7 +53,7 @@ class MainHeatAttributes(Definitions):
|
|||
"pwmp gwres sygçön tarddu yn y ddaear, rheiddiaduron, trydan": "ground source heat pump, radiators, electric",
|
||||
"gwresogyddion ystafell, pelenni coed": "room heaters, wood pellets",
|
||||
"gwresogyddion ystafell, glo": "room heaters, coal",
|
||||
"bwyler a gwres dan y llawr, lpg": "boiler and underfloor heating, LPG",
|
||||
"bwyler a gwres dan y llawr, lpg": "boiler and underfloor heating, lpg",
|
||||
"bwyler a gwres dan y llawr, trydan": "boiler and underfloor heating, electric"
|
||||
}
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -27,6 +27,12 @@ class TestMainHeatAttributes:
|
|||
expected_result = test_case.copy()
|
||||
del expected_result["original_description"]
|
||||
result = MainHeatAttributes(test_case['original_description']).process()
|
||||
|
||||
# Some of the expected_result test data was produced before some attributes were added to the code
|
||||
# base so we need to filter out some of the keys. The test is still valid
|
||||
result = {k: v for k, v in result.items() if v}
|
||||
expected_result = {k: v for k, v in expected_result.items() if v}
|
||||
|
||||
assert sorted(result.items()) == sorted(expected_result.items())
|
||||
|
||||
def test_invalid_description(self):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue