From 21d216cd4eadbf4716932d48209d644c5027c00e Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Fri, 27 Mar 2026 01:15:02 +0000 Subject: [PATCH] fix vents tests --- .../tests/test_ventilation_recommendations.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/recommendations/tests/test_ventilation_recommendations.py b/recommendations/tests/test_ventilation_recommendations.py index 15c9435c..3b7dae8e 100644 --- a/recommendations/tests/test_ventilation_recommendations.py +++ b/recommendations/tests/test_ventilation_recommendations.py @@ -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()