#NEWLINE# def test_user_agent_from_headers( ) : #NEWLINE# #INDENT# s = Scraper ( requests_per_minute = 0 ) #NEWLINE# s . headers = { #NEWLINE# #INDENT# 'User-Agent' : 'from headers' , #NEWLINE# #UNINDENT# } #NEWLINE# resp = s . get ( ( HTTPBIN + 'user-agent' ) ) #NEWLINE# ua = resp . json ( ) [ 'user-agent' ] #NEWLINE# assert ( s == 'from headers' )