mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Fixed broken test
This commit is contained in:
parent
3501bb8c5d
commit
018f7a23f9
1 changed files with 6 additions and 7 deletions
|
|
@ -190,10 +190,10 @@ class TestWallRecommendations:
|
|||
class TestWallRecommendationsBase:
|
||||
@pytest.fixture
|
||||
def property_mock(self):
|
||||
property_instance = MagicMock(spec=Property)
|
||||
property_instance.full_sap_epc = {"lodgement-date": "1999-12-31"}
|
||||
property_instance.in_conservation_area = "not_in_conservation_area"
|
||||
return property_instance
|
||||
property_mock = MagicMock(spec=Property)
|
||||
property_mock.full_sap_epc = {"lodgement-date": "1999-12-31"}
|
||||
property_mock.in_conservation_area = "not_in_conservation_area"
|
||||
return property_mock
|
||||
|
||||
@pytest.fixture
|
||||
def uvalue_estimations_mock(self):
|
||||
|
|
@ -217,7 +217,7 @@ class TestWallRecommendationsBase:
|
|||
'decile_boundaries': np.array([11., 49., 52., 56., 63., 70., 74., 79.,
|
||||
90., 103.8, 1936.])}
|
||||
|
||||
uvalue_estimations_mock.classify_decile_newvalues.return_value = "Decile 1"
|
||||
uvalue_estimations_mock.classify_decile_newvalues.return_value = ["Decile 1"]
|
||||
return uvalue_estimations_mock
|
||||
|
||||
@pytest.fixture
|
||||
|
|
@ -227,7 +227,6 @@ class TestWallRecommendationsBase:
|
|||
"decile_labels": MagicMock(),
|
||||
"decile_boundaries": MagicMock()
|
||||
}
|
||||
uvalue_estimations_mock.classify_decile_newvalues.return_value = "Decile 1"
|
||||
return wall_recommendations_instance
|
||||
|
||||
def test_ewi_valid_in_conservation_area(self, wall_recommendations_instance):
|
||||
|
|
@ -256,7 +255,7 @@ class TestWallRecommendationsBase:
|
|||
"number-heated-rooms": ""
|
||||
}
|
||||
|
||||
assert wall_recommendations_instance._get_walls_uvalue_estimate() == 0.2
|
||||
assert wall_recommendations_instance._get_walls_uvalue_estimate() == 0.15
|
||||
|
||||
def test_recommend_without_u_value(self, wall_recommendations_instance):
|
||||
wall_recommendations_instance.property.walls = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue