mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +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 etl.epc.Record import EPCRecord
|
||||
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:
|
||||
|
|
@ -86,9 +80,10 @@ class TestSolarPvRecommendations:
|
|||
def test_valid_all_conditions(self, property_instance_valid_all):
|
||||
solar_pv = SolarPvRecommendations(property_instance_valid_all)
|
||||
solar_pv.recommend(phase=0)
|
||||
assert len(solar_pv.recommendation) == 2
|
||||
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 '
|
||||
'roof.',
|
||||
'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}
|
||||
},
|
||||
{
|
||||
'phase': 0, 'parts': [], 'type': 'solar_pv',
|
||||
'description': 'Install a 4.0 kilowatt-peak (kWp) '
|
||||
'solar photovoltaic (PV) panel system '
|
||||
'on 50% the roof, with a battery '
|
||||
'storage system.',
|
||||
'starting_u_value': None, 'new_u_value': None,
|
||||
'sap_points': None, 'already_installed': False,
|
||||
'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,
|
||||
'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 '
|
||||
'roof, '
|
||||
'with a battery storage system.',
|
||||
'starting_u_value': None, 'new_u_value': None, 'sap_points': None, 'already_installed': False,
|
||||
'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}
|
||||
}
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue