def test_get_volumes_parameters_exc(volumes): """Tests that volumes are correctly converted from list into dict.""" with pytest.raises(ValueError, match="Unknown volume type: unknown"): generate_code.get_volume_parameters(volumes)
def test_get_volumes_parameters(volumes, target): """Tests that volumes are correctly converted from list into dict.""" assert target == generate_code.get_volume_parameters(volumes)