fix vents tests

This commit is contained in:
Khalim Conn-Kowlessar 2026-03-27 01:15:02 +00:00
parent 845ab857b2
commit 21d216cd4e

View file

@ -7,8 +7,7 @@ from etl.epc.Record import EPCRecord
class TestVentilationRecommendations:
def test_natural_ventilation(self):
epc_record = EPCRecord()
epc_record.prepared_epc = {"mechanical-ventilation": "natural"}
epc_record = EPCRecord(mechanical_ventilation="natural")
input_property1 = Property(id=1, postcode="F4k3 6", address="623 fake street", epc_record=epc_record)
input_property1.already_installed = []
@ -31,8 +30,7 @@ class TestVentilationRecommendations:
assert recommender.recommendation[0]["parts"][0]["quantity"] == 2
def test_missing_ventilation(self):
epc_record = EPCRecord()
epc_record.prepared_epc = {"mechanical-ventilation": None}
epc_record = EPCRecord(mechanical_ventilation=None)
input_property2 = Property(id=1, postcode="F4k3 6", address="623 fake street", epc_record=epc_record)
input_property2.already_installed = []
@ -55,8 +53,7 @@ class TestVentilationRecommendations:
assert recommender2.recommendation[0]["parts"][0]["quantity"] == 2
def test_nodata_ventilation(self):
epc_record = EPCRecord()
epc_record.prepared_epc = {"mechanical-ventilation": "NO DATA!!"}
epc_record = EPCRecord(mechanical_ventilation="NO DATA!!")
input_property3 = Property(id=1, postcode="F4k3 6", address="623 fake street", epc_record=epc_record)
input_property3.already_installed = []
@ -79,8 +76,7 @@ class TestVentilationRecommendations:
assert recommender3.recommendation[0]["parts"][0]["quantity"] == 2
def test_existing_ventilation_1(self):
epc_record = EPCRecord()
epc_record.prepared_epc = {"mechanical-ventilation": "mechanical, extract only"}
epc_record = EPCRecord(mechanical_ventilation="mechanical, extract only")
input_property4 = Property(id=1, postcode="F4k3 6", address="623 fake street", epc_record=epc_record)
input_property4.already_installed = []
input_property4.identify_ventilation()
@ -98,8 +94,7 @@ class TestVentilationRecommendations:
assert not recommender4.recommendation
def test_existing_ventilation_2(self):
epc_record = EPCRecord()
epc_record.prepared_epc = {"mechanical-ventilation": "mechanical, supply and extract"}
epc_record = EPCRecord(mechanical_ventilation="mechanical, supply and extract")
input_property5 = Property(id=1, postcode="F4k3 6", address="623 fake street", epc_record=epc_record)
input_property5.already_installed = []
input_property5.identify_ventilation()