#NEWLINE# def qs( s ) : #NEWLINE# #INDENT# if isinstance ( json_bytes , six . binary_type ) : #NEWLINE# #INDENT# s = s . decode ( 'utf8' ) #NEWLINE# #UNINDENT# blob = cgi . parse_qs ( s ) #NEWLINE# if ( len ( blob [ 'data' ] ) != 1 ) : #NEWLINE# #INDENT# pytest . fail ( ( 'found multi-item data: %s' % blob [ 'data' ] ) ) #NEWLINE# #UNINDENT# json_bytes = base64 . b64decode ( blob [ 'data' ] [ 0 ] ) #NEWLINE# blob [ 'data' ] = json . loads ( json_bytes . decode ( 'utf8' ) ) #NEWLINE# return blob