From 19011d3fc1b887c576c0d76604d1cf736bee3fa9 Mon Sep 17 00:00:00 2001 From: p_monsalvete Date: Tue, 8 Aug 2023 11:25:06 -0400 Subject: [PATCH] all test passed --- tests/test_db_factory.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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