#NEWLINE# def test_post_query_string( self ) : #NEWLINE# #INDENT# d = testlib . randdict ( ) #NEWLINE# data = urlfetch . urlencode ( d ) #NEWLINE# qs = testlib . randdict ( 5 ) #NEWLINE# query_string = urlfetch . urlencode ( qs ) #NEWLINE# r = urlfetch . post ( testlib . url ( ( '?' + query_string ) ) , data = data ) #NEWLINE# o = json . loads ( r . text ) #NEWLINE# self . assertEqual ( r . status , 200 ) #NEWLINE# self . assertTrue ( isinstance ( r . json , dict ) ) #NEWLINE# self . assertTrue ( isinstance ( r . text , urlfetch . unicode ) ) #NEWLINE# self . assertEqual ( o [ 'method' ] , 'POST' ) #NEWLINE# self . assertEqual ( o [ 'post' ] , d ) #NEWLINE# self . assertEqual ( o [ 'get' ] , qs ) #NEWLINE# self . assertEqual ( o [ 'query_string' ] , query_string )