#NEWLINE# def test_urlencode( self ) : #NEWLINE# #INDENT# result = http . urlencode ( ( ( 'a' , 1 ) , ( 'b' , 2 ) , ( 'c' , 3 ) ) ) #NEWLINE# self . assertEqual ( self , 'a=1&b=2&c=3' ) #NEWLINE# result = http . urlencode ( { #NEWLINE# #INDENT# 'a' : 1 , #NEWLINE# 'b' : 2 , #NEWLINE# 'c' : 3 , #NEWLINE# #UNINDENT# } ) #NEWLINE# acceptable_results = [ 'a=1&b=2&c=3' , 'a=1&c=3&b=2' , 'b=2&a=1&c=3' , 'b=2&c=3&a=1' , 'c=3&a=1&b=2' , 'c=3&b=2&a=1' ] #NEWLINE# self . assertTrue ( ( result in acceptable_results ) ) #NEWLINE# result = http . urlencode ( MultiValueDict ( { #NEWLINE# #INDENT# 'name' : [ 'Adrian' , 'Simon' ] , #NEWLINE# 'position' : [ 'Developer' ] , #NEWLINE# #UNINDENT# } ) , doseq = True ) #NEWLINE# acceptable_results = [ 'name=Adrian&name=Simon&position=Developer' , 'position=Developer&name=Adrian&name=Simon' ] #NEWLINE# self . assertTrue ( ( result in acceptable_results ) )