#NEWLINE# @ patch ( 'paasta_tools.cli.utils._run' , autospec = True ) #NEWLINE# def test_run_chronos_rerun( mock_run ) : #NEWLINE# #INDENT# mock_run . return_value = ( 0 , 'fake_output' ) #NEWLINE# expected_command = 'ssh -A -n fake_master \'sudo chronos_rerun -v -v "a_service an_instance" "2016-04-08T02:37:27"\'' #NEWLINE# actual = utils . run_chronos_rerun ( 'fake_master' , 'a_service' , 'an_instance' , verbose = 2 , execution_date = '2016-04-08T02:37:27' ) #NEWLINE# mock_run . assert_called_once_with ( expected_command , timeout = mock . ANY ) #NEWLINE# assert ( actual == mock_run . return_value )