From ed7cb6998bbc683d09b850908887c8ea3b74bbcc Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Thu, 22 Jan 2026 08:55:51 +0000 Subject: [PATCH] fixed floor recommendation tests --- .../tests/test_floor_recommendations.py | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/recommendations/tests/test_floor_recommendations.py b/recommendations/tests/test_floor_recommendations.py index eb4f30d2..e24312fe 100644 --- a/recommendations/tests/test_floor_recommendations.py +++ b/recommendations/tests/test_floor_recommendations.py @@ -132,11 +132,21 @@ class TestFloorRecommendations: assert types == {"solid_floor_insulation"} - assert len(recommender.recommendations) == 3 - assert recommender.recommendations[2]["total"] == 14604.660000000002 - assert recommender.recommendations[2]["new_u_value"] == 0.21 - assert recommender.recommendations[2]["parts"][0]["depth"] == 75 - assert recommender.recommendations[2]["parts"][0]["depth"] == 75 + assert len(recommender.recommendations) == 1 + assert ( + recommender.recommendations[0]["description"] == + 'Install 75mm Kingspan Thermafloor TF70 High Performance Rigid Floor ' + 'Insulation insulation on solid floor' + ) + + assert recommender.recommendations[0]["new_u_value"] == 0.21 + assert recommender.recommendations[0]["simulation_config"] == { + 'floor_is_assumed_ending': False, 'floor_insulation_thickness_ending': 'average', + 'floor_thermal_transmittance_ending': 0.685593 + } + assert recommender.recommendations[0]["description_simulation"] == { + 'floor-description': 'Solid, insulated' + } def test_another_dwelling_below(self, input_properties): """ @@ -172,6 +182,7 @@ class TestFloorRecommendations: input_property.set_floor_type() input_property.floor_area = 100 input_property.number_of_floors = 1 + input_property.already_installed = [] recommender = FloorRecommendations( property_instance=input_property, @@ -203,6 +214,7 @@ class TestFloorRecommendations: input_property2.set_floor_type() input_property2.insulation_floor_area = 100 input_property2.number_of_floors = 1 + input_property2.already_installed = [] recommender2 = FloorRecommendations( property_instance=input_property2, @@ -235,6 +247,7 @@ class TestFloorRecommendations: input_property3.set_floor_type() input_property3.insulation_floor_area = 100 input_property3.number_of_floors = 1 + input_property3.already_installed = [] recommender3 = FloorRecommendations( property_instance=input_property3,