#NEWLINE# @ mock . patch ( 'paasta_tools.cli.utils.list_all_instances_for_service' , autospec = True ) #NEWLINE# def test_guess_instances_picks_something( mock_list_all_instances_for_service ) : #NEWLINE# #INDENT# mock_list_all_instances_for_service . return_value = [ 'a' , 'b' , 'c' ] #NEWLINE# args = mock . MagicMock ( ) #NEWLINE# args . instance = None #NEWLINE# actual = utils . guess_instance ( service = 'fake_service' , cluster = None , args = args ) #NEWLINE# assert ( actual in [ 'a' , 'b' , 'c' ] )