def test_check_if_energy_vector_of_all_assets_is_valid_passes(): dict_test = { PROJECT_DATA: { LES_ENERGY_VECTOR_S: {"Electricity"} }, ENERGY_PRODUCTION: { ENERGY_VECTOR: "Electricity" }, } C1.check_if_energy_vector_of_all_assets_is_valid(dict_test) assert ( 1 == 1 ), f"The function incorrectly identifies an energy vector as being not defined via the energyBusses (as the project energy vector)."
def test_check_if_energy_vector_of_all_assets_is_valid_fails(): dict_test = { PROJECT_DATA: { LES_ENERGY_VECTOR_S: {"Electricity"} }, ENERGY_PRODUCTION: { "Asset": { ENERGY_VECTOR: "Heat" } }, } with pytest.raises(ValueError): C1.check_if_energy_vector_of_all_assets_is_valid( dict_test ), f"The function incorrectly accepts an energyVector that is not in the energyBusses (as the project energy vector)."