mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
extract secondary heating system 🟥
This commit is contained in:
parent
4410b6f3e9
commit
1e0d72a805
2 changed files with 21 additions and 0 deletions
|
|
@ -402,6 +402,26 @@ class TestWaterHeatingCylinderThickness:
|
|||
assert hhw.water_heating.cylinder_size == "Normal (90-130 litres)"
|
||||
|
||||
|
||||
class TestSecondaryHeating:
|
||||
@pytest.fixture
|
||||
def hhw(self) -> HeatingAndHotWater:
|
||||
return PasHubRdSapSiteNotesExtractor(
|
||||
load_text_fixture_2()
|
||||
).extract_heating_and_hot_water()
|
||||
|
||||
@pytest.fixture
|
||||
def hhw_no_secondary(self) -> HeatingAndHotWater:
|
||||
return PasHubRdSapSiteNotesExtractor(
|
||||
load_text_fixture()
|
||||
).extract_heating_and_hot_water()
|
||||
|
||||
def test_secondary_system(self, hhw: HeatingAndHotWater) -> None:
|
||||
assert hhw.secondary_heating.secondary_system == "Open fire in grate"
|
||||
|
||||
def test_secondary_system_absent(self, hhw_no_secondary: HeatingAndHotWater) -> None:
|
||||
assert hhw_no_secondary.secondary_heating.secondary_system is None
|
||||
|
||||
|
||||
class TestHeatingAndHotWater:
|
||||
@pytest.fixture
|
||||
def hhw(self) -> HeatingAndHotWater:
|
||||
|
|
|
|||
|
|
@ -179,6 +179,7 @@ class MainHeating:
|
|||
@dataclass
|
||||
class SecondaryHeating:
|
||||
secondary_fuel: str
|
||||
secondary_system: Optional[str] = None
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue