def test_check_non_dispatchable_source_time_series_passes(): dict_values = { ENERGY_PRODUCTION: { "asset": { TIMESERIES: pd.Series([0, 0.22, 0.5, 0.99, 1]), DISPATCHABILITY: False, } } } return_value = C1.check_non_dispatchable_source_time_series( dict_values=dict_values) assert return_value is None
def test_check_non_dispatchable_source_time_series_results_in_error_msg(): dict_values = { ENERGY_PRODUCTION: { "asset": { TIMESERIES: pd.Series([0, 0.22, 0.5, 0.99, 1, 1.01]), DISPATCHABILITY: False, LABEL: "asset", } } } return_value = C1.check_non_dispatchable_source_time_series( dict_values=dict_values) assert return_value is False
def test_check_non_dispatchable_source_time_series_results_in_error_msg( get_json): dict_values = get_json(pd.Series([0, 0.22, 0.5, 0.99, 1, 1.01])) return_value = C1.check_non_dispatchable_source_time_series( dict_values=dict_values) assert return_value is False
def test_check_non_dispatchable_source_time_series_passes(get_json): dict_values = get_json(pd.Series([0, 0.22, 0.5, 0.99, 1])) return_value = C1.check_non_dispatchable_source_time_series( dict_values=dict_values) assert return_value is None