def test_accept_custom_exception_text():
    custom_converter = lambda value: value + " converted"
    custom_type = hug.types.accept(custom_converter, 'A string Value', 'Error occurred')
    assert custom_type('bacon') == 'bacon converted'
    with pytest.raises(ValueError):
        custom_type(1)
Tests to ensure it's easy to custom the exception text using the accept wrapper
dataset/ETHPy150Open timothycrosley/hug/tests/test_types.py/test_accept_custom_exception_text