#NEWLINE# @ pytest . mark . httpretty #NEWLINE# def test_headers_custom( resource_class ) : #NEWLINE# #INDENT# resource_class . headers = { #NEWLINE# #INDENT# 'User-Agent' : 'durga-test' , #NEWLINE# 'authorisation' : 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==' , #NEWLINE# #UNINDENT# } #NEWLINE# resource = resource_class ( ) #NEWLINE# httpretty . register_uri ( httpretty . GET , resource . url , body = '[]' , content_type = 'application/json' ) #NEWLINE# resource . collection . count ( ) #NEWLINE# headers = resource . collection . response . request . headers #NEWLINE# assert ( headers [ 'authorisation' ] == resource . headers [ 'authorisation' ] ) #NEWLINE# assert ( headers [ 'User-Agent' ] == resource . headers [ 'User-Agent' ] )