#NEWLINE# def test_is_app_id_running_handles_leading_slashes( self ) : #NEWLINE# #INDENT# fake_id = '/fake_app1' #NEWLINE# fake_all_marathon_app_ids = [ 'fake_app1' , 'fake_app2' ] #NEWLINE# fake_client = mock . Mock ( ) #NEWLINE# with mock . patch ( 'paasta_tools.marathon_tools.list_all_marathon_app_ids' , autospec = True , return_value = fake_all_marathon_app_ids ) as list_all_marathon_app_ids_patch : #NEWLINE# #INDENT# assert ( marathon_tools . is_app_id_running ( fake_id , self ) is True ) #NEWLINE# list_all_marathon_app_ids_patch . assert_called_once_with ( fake_client )