diff --git a/tests/test_db_factory.py b/tests/test_db_factory.py index ec72e37d..07f94467 100644 --- a/tests/test_db_factory.py +++ b/tests/test_db_factory.py @@ -245,8 +245,10 @@ TestDBFactory cte.MONTH] yearly_distribution_systems_electrical_consumption = building.distribution_systems_electrical_consumption[ cte.YEAR] - monthly_on_site_electrical_production = building.onsite_electrical_production[cte.MONTH] - yearly_on_site_electrical_production = building.onsite_electrical_production[cte.YEAR] + monthly_on_site_electrical_production = [x * cte.WATTS_HOUR_TO_JULES + for x in building.onsite_electrical_production[cte.MONTH]] + yearly_on_site_electrical_production = [x * cte.WATTS_HOUR_TO_JULES + for x in building.onsite_electrical_production[cte.YEAR]] results = json.dumps({cte.INSEL_MEB: [ {'monthly_cooling_peak_load': monthly_cooling_peak_load}, {'yearly_cooling_peak_load': yearly_cooling_peak_load}, @@ -274,8 +276,8 @@ TestDBFactory {'yearly_domestic_hot_water_consumption': yearly_domestic_hot_water_consumption}, {'monthly_distribution_systems_electrical_consumption': monthly_distribution_systems_electrical_consumption}, {'yearly_distribution_systems_electrical_consumption': yearly_distribution_systems_electrical_consumption}, - {'monthly_on_site_electrical_production': monthly_on_site_electrical_production * cte.WATTS_HOUR_TO_JULES}, - {'yearly_on_site_electrical_production': yearly_on_site_electrical_production * cte.WATTS_HOUR_TO_JULES} + {'monthly_on_site_electrical_production': monthly_on_site_electrical_production}, + {'yearly_on_site_electrical_production': yearly_on_site_electrical_production} ]}) db_building_id = _building.id