mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
adding measure type to solar unit tests
This commit is contained in:
parent
92fce7f093
commit
8ff29603c3
1 changed files with 9 additions and 18 deletions
|
|
@ -3,12 +3,6 @@ from recommendations.SolarPvRecommendations import SolarPvRecommendations
|
||||||
from backend.Property import Property
|
from backend.Property import Property
|
||||||
from etl.epc.Record import EPCRecord
|
from etl.epc.Record import EPCRecord
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
from datetime import datetime
|
|
||||||
from utils.s3 import read_dataframe_from_s3_parquet, read_from_s3
|
|
||||||
from etl.solar.SolarPhotoSupply import SolarPhotoSupply
|
|
||||||
from recommendations.Recommendations import Recommendations
|
|
||||||
from backend.ml_models.api import ModelApi
|
|
||||||
import msgpack
|
|
||||||
|
|
||||||
|
|
||||||
class TestSolarPvRecommendations:
|
class TestSolarPvRecommendations:
|
||||||
|
|
@ -86,9 +80,10 @@ class TestSolarPvRecommendations:
|
||||||
def test_valid_all_conditions(self, property_instance_valid_all):
|
def test_valid_all_conditions(self, property_instance_valid_all):
|
||||||
solar_pv = SolarPvRecommendations(property_instance_valid_all)
|
solar_pv = SolarPvRecommendations(property_instance_valid_all)
|
||||||
solar_pv.recommend(phase=0)
|
solar_pv.recommend(phase=0)
|
||||||
|
assert len(solar_pv.recommendation) == 2
|
||||||
assert solar_pv.recommendation == [
|
assert solar_pv.recommendation == [
|
||||||
{
|
{
|
||||||
'phase': 0, 'parts': [], 'type': 'solar_pv',
|
'phase': 0, 'parts': [], 'type': 'solar_pv', 'measure_type': 'solar_pv',
|
||||||
'description': 'Install a 4.0 kilowatt-peak (kWp) solar photovoltaic (PV) panel system on 50% the '
|
'description': 'Install a 4.0 kilowatt-peak (kWp) solar photovoltaic (PV) panel system on 50% the '
|
||||||
'roof.',
|
'roof.',
|
||||||
'starting_u_value': None, 'new_u_value': None, 'sap_points': None, 'already_installed': False,
|
'starting_u_value': None, 'new_u_value': None, 'sap_points': None, 'already_installed': False,
|
||||||
|
|
@ -97,17 +92,13 @@ class TestSolarPvRecommendations:
|
||||||
'description_simulation': {'photo-supply': 50.0}
|
'description_simulation': {'photo-supply': 50.0}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'phase': 0, 'parts': [], 'type': 'solar_pv',
|
'phase': 0, 'parts': [], 'type': 'solar_pv', 'measure_type': 'solar_pv',
|
||||||
'description': 'Install a 4.0 kilowatt-peak (kWp) '
|
'description': 'Install a 4.0 kilowatt-peak (kWp) solar photovoltaic (PV) panel system on 50% the '
|
||||||
'solar photovoltaic (PV) panel system '
|
'roof, '
|
||||||
'on 50% the roof, with a battery '
|
'with a battery storage system.',
|
||||||
'storage system.',
|
'starting_u_value': None, 'new_u_value': None, 'sap_points': None, 'already_installed': False,
|
||||||
'starting_u_value': None, 'new_u_value': None,
|
'total': 7550.0, 'subtotal': 6291.666666666667, 'vat': 1258.333333333333, 'labour_hours': 48,
|
||||||
'sap_points': None, 'already_installed': False,
|
'labour_days': 2, 'photo_supply': 50.0, 'has_battery': True, 'initial_ac_kwh_per_year': 3800,
|
||||||
'total': 7550.0, 'subtotal': 6291.666666666667,
|
|
||||||
'vat': 1258.333333333333, 'labour_hours': 48,
|
|
||||||
'labour_days': 2, 'photo_supply': 50.0,
|
|
||||||
'has_battery': True, 'initial_ac_kwh_per_year': 3800,
|
|
||||||
'description_simulation': {'photo-supply': 50.0}
|
'description_simulation': {'photo-supply': 50.0}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue