From b0f75b5e5b9a4d8aadf5e0bf83d3cff29ea5c57a Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Thu, 15 May 2025 16:52:03 +0100 Subject: [PATCH] updating fixtures with function call --- backend/tests/test_property.py | 2 +- etl/epc/tests/test_epcrecord.py | 2 +- recommendations/tests/test_heating_recommendations.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/tests/test_property.py b/backend/tests/test_property.py index 7f7cc140..776c1491 100644 --- a/backend/tests/test_property.py +++ b/backend/tests/test_property.py @@ -110,7 +110,7 @@ class TestProperty: return property_instance - @pytest.fixture + @pytest.fixture() def mock_cleaner(self): lighting_averages = [ {'lighting-description': 'good lighting efficiency', 'low-energy-lighting': 99.26666666666667}, diff --git a/etl/epc/tests/test_epcrecord.py b/etl/epc/tests/test_epcrecord.py index b7d3fda4..39e1ee60 100644 --- a/etl/epc/tests/test_epcrecord.py +++ b/etl/epc/tests/test_epcrecord.py @@ -8,7 +8,7 @@ import random class TestEpcRecord: - @pytest.fixture + @pytest.fixture() def cleaning_data(self): with open("recommendations/tests/test_data/cleaning_data.pkl", "rb") as f: data = pickle.load(f) diff --git a/recommendations/tests/test_heating_recommendations.py b/recommendations/tests/test_heating_recommendations.py index 9ddc8bb7..039801e1 100644 --- a/recommendations/tests/test_heating_recommendations.py +++ b/recommendations/tests/test_heating_recommendations.py @@ -11,21 +11,21 @@ from recommendations.tests.test_data.heating_recommendations_data import testing class TestHeatingRecommendations: - @pytest.fixture + @pytest.fixture() def cleaning_data(self): with open("recommendations/tests/test_data/cleaning_data.pkl", "rb") as f: data = pickle.load(f) return data - @pytest.fixture + @pytest.fixture() def cleaned(self): with open("recommendations/tests/test_data/cleaned.pkl", "rb") as f: df = pickle.load(f) return df - @pytest.fixture + @pytest.fixture() def kwh_client(self): client = KwhData(bucket="retrofit-data-dev", read_consumption_data=False) # We fix this pricing table for these tests