def test_multi():
    multi_type = hug.types.multi(hug.types.json, hug.types.smart_boolean)
    assert multi_type({'this': 'works'}) == {'this': 'works'}
    assert multi_type(json.dumps({'this': 'works'})) == {'this': 'works'}
    assert multi_type('t')
    with pytest.raises(ValueError):
        multi_type('Bacon!')
Test to ensure that the multi type correctly handles a variety of value types
dataset/ETHPy150Open timothycrosley/hug/tests/test_types.py/test_multi