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!')

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 .