diff --git a/model_data/recommendations/FloorRecommendations.py b/model_data/recommendations/FloorRecommendations.py index 8b47e31e..d120dba0 100644 --- a/model_data/recommendations/FloorRecommendations.py +++ b/model_data/recommendations/FloorRecommendations.py @@ -84,7 +84,9 @@ class FloorRecommendations(BaseUtility): PART_L_YEAR_CUTOFF = 2002 FLOOR_LEVELS = { - "Ground": 0 + "Ground": 0, + # We don't know what floor level, we just make sure it's not 0 + "mid floor": 1 } def __init__(self, property_instance: Property, uvalue_estimates: UvalueEstimations): diff --git a/model_data/tests/test_data/input_properties.pkl b/model_data/tests/test_data/input_properties.pkl index 6fd5b797..09aa1dc9 100644 Binary files a/model_data/tests/test_data/input_properties.pkl and b/model_data/tests/test_data/input_properties.pkl differ diff --git a/model_data/tests/test_floor_recommendations.py b/model_data/tests/test_floor_recommendations.py index e6a3c012..95e17ce1 100644 --- a/model_data/tests/test_floor_recommendations.py +++ b/model_data/tests/test_floor_recommendations.py @@ -4,15 +4,16 @@ import os from unittest.mock import Mock from model_data.recommendations.FloorRecommendations import FloorRecommendations -with open( - os.path.abspath(os.path.dirname(__file__)) + "/model_data/tests/test_data/input_properties.pkl", "rb" -) as f: - input_properties = pickle.load(f) -with open( - os.path.abspath(os.path.dirname(__file__)) + "/model_data/tests/test_data/uvalue_estimates.pkl", "rb" -) as f: - uvalue_estimates = pickle.load(f) +# with open( +# os.path.abspath(os.path.dirname(__file__)) + "/model_data/tests/test_data/input_properties.pkl", "rb" +# ) as f: +# input_properties = pickle.load(f) +# +# with open( +# os.path.abspath(os.path.dirname(__file__)) + "/model_data/tests/test_data/uvalue_estimates.pkl", "rb" +# ) as f: +# uvalue_estimates = pickle.load(f) class TestWallRecommendations: @@ -48,3 +49,7 @@ class TestWallRecommendations: assert obj assert obj.property assert obj.uvalue_estimates + + def test_premises_below(self, input_properties, uvalue_estimates): + recommender = FloorRecommendations(property_instance=input_properties[0], uvalue_estimates=uvalue_estimates) + recommender.recommend()