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!')
Init.
dataset/ETHPy150Open timothycrosley/hug/tests/test_types.py/test_multi--crossover with--dataset/ETHPy150Open GoogleCloudPlatform/appengine-mapreduce/python/src/mapreduce/map_job_context.py/ShardContext.__init__