mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
updating fixtures with function call
This commit is contained in:
parent
eb35ea49ff
commit
b0f75b5e5b
3 changed files with 5 additions and 5 deletions
|
|
@ -110,7 +110,7 @@ class TestProperty:
|
||||||
|
|
||||||
return property_instance
|
return property_instance
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture()
|
||||||
def mock_cleaner(self):
|
def mock_cleaner(self):
|
||||||
lighting_averages = [
|
lighting_averages = [
|
||||||
{'lighting-description': 'good lighting efficiency', 'low-energy-lighting': 99.26666666666667},
|
{'lighting-description': 'good lighting efficiency', 'low-energy-lighting': 99.26666666666667},
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import random
|
||||||
|
|
||||||
class TestEpcRecord:
|
class TestEpcRecord:
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture()
|
||||||
def cleaning_data(self):
|
def cleaning_data(self):
|
||||||
with open("recommendations/tests/test_data/cleaning_data.pkl", "rb") as f:
|
with open("recommendations/tests/test_data/cleaning_data.pkl", "rb") as f:
|
||||||
data = pickle.load(f)
|
data = pickle.load(f)
|
||||||
|
|
|
||||||
|
|
@ -11,21 +11,21 @@ from recommendations.tests.test_data.heating_recommendations_data import testing
|
||||||
|
|
||||||
class TestHeatingRecommendations:
|
class TestHeatingRecommendations:
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture()
|
||||||
def cleaning_data(self):
|
def cleaning_data(self):
|
||||||
with open("recommendations/tests/test_data/cleaning_data.pkl", "rb") as f:
|
with open("recommendations/tests/test_data/cleaning_data.pkl", "rb") as f:
|
||||||
data = pickle.load(f)
|
data = pickle.load(f)
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture()
|
||||||
def cleaned(self):
|
def cleaned(self):
|
||||||
with open("recommendations/tests/test_data/cleaned.pkl", "rb") as f:
|
with open("recommendations/tests/test_data/cleaned.pkl", "rb") as f:
|
||||||
df = pickle.load(f)
|
df = pickle.load(f)
|
||||||
|
|
||||||
return df
|
return df
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture()
|
||||||
def kwh_client(self):
|
def kwh_client(self):
|
||||||
client = KwhData(bucket="retrofit-data-dev", read_consumption_data=False)
|
client = KwhData(bucket="retrofit-data-dev", read_consumption_data=False)
|
||||||
# We fix this pricing table for these tests
|
# We fix this pricing table for these tests
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue