#NEWLINE# @ responses . activate #NEWLINE# def test_push_job_does_not_retry( self ) : #NEWLINE# #INDENT# client = HubstorageClient ( auth = self . auth , endpoint = self . endpoint , max_retries = 3 ) #NEWLINE# ( callback , attempts_count ) = self . make_request_callback ( 2 , { #NEWLINE# #INDENT# 'key' : '1/2/3' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . mock_api ( POST , callback = callback ) #NEWLINE# ( job , err ) = ( None , None ) #NEWLINE# try : #NEWLINE# #INDENT# job = client . push_job ( self . projectid , self . spidername ) #NEWLINE# #UNINDENT# except HTTPError as e : #NEWLINE# #INDENT# err = e #NEWLINE# #UNINDENT# self . assertIsNone ( job ) #NEWLINE# self . assertIsNotNone ( err ) #NEWLINE# self . assertEqual ( e . response . status_code , 504 ) #NEWLINE# self . assertEqual ( attempts_count [ 0 ] , 1 )