#NEWLINE# def test_get_user_agent( self ) : #NEWLINE# #INDENT# headers = { #NEWLINE# #INDENT# 'User-Agent' : 'Mozilla123' , #NEWLINE# #UNINDENT# } #NEWLINE# r = self . request ( { #NEWLINE# #INDENT# 'url' : self . mockurl ( 'getrequest' ) , #NEWLINE# 'headers' : headers , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertStatusCode ( r , 200 ) #NEWLINE# if six . PY3 : #NEWLINE# #INDENT# self . assertIn ( "b'user-agent': b'Mozilla123'" , r . text ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . assertIn ( "'user-agent': 'Mozilla123'" , r . text )