def test_check_feedin_tariff_vs_energy_price_not_greater_energy_price(): dict_values = { ENERGY_PROVIDERS: { "DSO": { ENERGY_PRICE: { UNIT: "currency/kWh", VALUE: 0.5 }, FEEDIN_TARIFF: { UNIT: "currency/kWh", VALUE: 0.4 }, LABEL: "test DSO", } } } C1.check_feedin_tariff_vs_energy_price(dict_values)
def test_check_feedin_tariff_vs_energy_price_greater_energy_price(): dict_values = { ENERGY_PROVIDERS: { "DSO": { ENERGY_PRICE: { UNIT: "currency/kWh", VALUE: 0.3 }, FEEDIN_TARIFF: { UNIT: "currency/kWh", VALUE: 0.4 }, LABEL: "test DSO", } } } with pytest.raises(ValueError): C1.check_feedin_tariff_vs_energy_price(dict_values)