mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
tidy up
This commit is contained in:
parent
771eaf7eb4
commit
402e607060
2 changed files with 26 additions and 11 deletions
|
|
@ -1,8 +1,6 @@
|
|||
from datetime import date
|
||||
from typing import List, Sequence, Union
|
||||
|
||||
from regex import T
|
||||
|
||||
from datatypes.epc.domain.epc_property_data import (
|
||||
EnergyElement,
|
||||
EpcPropertyData,
|
||||
|
|
@ -1493,6 +1491,6 @@ def _map_sap_heating(
|
|||
main_heating_control=main.controls,
|
||||
)
|
||||
],
|
||||
has_fixed_air_conditioning=str(ventilation.has_fixed_air_conditioning).lower(),
|
||||
has_fixed_air_conditioning=ventilation.has_fixed_air_conditioning,
|
||||
secondary_fuel_type=secondary_fuel_type,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -38,7 +38,9 @@ class TestFromSiteNotesExample1:
|
|||
|
||||
@pytest.fixture
|
||||
def survey(self) -> PasHubRdSapSiteNotes:
|
||||
return from_dict(PasHubRdSapSiteNotes, load("pashub_rdsap_site_notes_example1.json"))
|
||||
return from_dict(
|
||||
PasHubRdSapSiteNotes, load("pashub_rdsap_site_notes_example1.json")
|
||||
)
|
||||
|
||||
@pytest.fixture
|
||||
def result(self, survey: PasHubRdSapSiteNotes) -> EpcPropertyData:
|
||||
|
|
@ -159,7 +161,9 @@ class TestFromSiteNotesExample1:
|
|||
|
||||
def test_main_heating_emitter(self, result: EpcPropertyData) -> None:
|
||||
# heating_and_hot_water.main_heating.emitter: "Radiators"
|
||||
assert result.sap_heating.main_heating_details[0].heat_emitter_type == "Radiators"
|
||||
assert (
|
||||
result.sap_heating.main_heating_details[0].heat_emitter_type == "Radiators"
|
||||
)
|
||||
|
||||
def test_main_heating_no_fghrs(self, result: EpcPropertyData) -> None:
|
||||
# heating_and_hot_water.main_heating.flue_gas_heat_recovery_system: false
|
||||
|
|
@ -193,7 +197,9 @@ class TestFromSiteNotesExample1:
|
|||
assert result.sap_windows[0].orientation == "South East"
|
||||
|
||||
def test_window_glazing_type(self, result: EpcPropertyData) -> None:
|
||||
assert result.sap_windows[0].glazing_type == "Double glazing, Unknown install date"
|
||||
assert (
|
||||
result.sap_windows[0].glazing_type == "Double glazing, Unknown install date"
|
||||
)
|
||||
|
||||
# --- building parts ---
|
||||
|
||||
|
|
@ -231,19 +237,30 @@ class TestFromSiteNotesExample1:
|
|||
|
||||
def test_floor_area(self, result: EpcPropertyData) -> None:
|
||||
# building_measurements.main_building.floors[0].area_m2: 24.78
|
||||
assert result.sap_building_parts[0].sap_floor_dimensions[0].total_floor_area_m2 == 24.78
|
||||
assert (
|
||||
result.sap_building_parts[0].sap_floor_dimensions[0].total_floor_area_m2
|
||||
== 24.78
|
||||
)
|
||||
|
||||
def test_floor_height(self, result: EpcPropertyData) -> None:
|
||||
# floors[0].height_m: 2.37
|
||||
assert result.sap_building_parts[0].sap_floor_dimensions[0].room_height_m == 2.37
|
||||
assert (
|
||||
result.sap_building_parts[0].sap_floor_dimensions[0].room_height_m == 2.37
|
||||
)
|
||||
|
||||
def test_heat_loss_perimeter(self, result: EpcPropertyData) -> None:
|
||||
# floors[0].heat_loss_perimeter_m: 14.21
|
||||
assert result.sap_building_parts[0].sap_floor_dimensions[0].heat_loss_perimeter_m == 14.21
|
||||
assert (
|
||||
result.sap_building_parts[0].sap_floor_dimensions[0].heat_loss_perimeter_m
|
||||
== 14.21
|
||||
)
|
||||
|
||||
def test_party_wall_length(self, result: EpcPropertyData) -> None:
|
||||
# floors[0].pwl_m: 6.15
|
||||
assert result.sap_building_parts[0].sap_floor_dimensions[0].party_wall_length_m == 6.15
|
||||
assert (
|
||||
result.sap_building_parts[0].sap_floor_dimensions[0].party_wall_length_m
|
||||
== 6.15
|
||||
)
|
||||
|
||||
def test_total_floor_area(self, result: EpcPropertyData) -> None:
|
||||
# sum of all floor areas: 24.78 + 24.78 = 49.56
|
||||
|
|
@ -364,7 +381,7 @@ class TestFromSiteNotesExample1:
|
|||
main_heating_control="Programmer, room thermostat and TRVs",
|
||||
)
|
||||
],
|
||||
has_fixed_air_conditioning="false",
|
||||
has_fixed_air_conditioning=False,
|
||||
),
|
||||
# Windows
|
||||
sap_windows=[
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue