def test_urlencoded():
 test_data = BytesIO('foo=baz&foo=bar&name=John+Doe')
 assert (hug.input_format.urlencoded(test_data) == {'name': 'John Doe', 'foo': ['baz', 'bar']})

def test_urlencoded ( ) : test_data = BytesIO ( 'foo=baz&foo=bar&name=John+Doe' ) assert ( hug . input_format . urlencoded ( test_data ) == { 'name' : 'John Doe' , 'foo' : [ 'baz' , 'bar' ] } )
ensure that urlencoded input format works as intended .