#NEWLINE# def _mock_lookup_configdrive_path( self , ext , rescue = False ) : #NEWLINE# #INDENT# self . _pathutils . get_instance_dir = mock . MagicMock ( return_value = self . fake_instance_dir ) #NEWLINE# def mock_exists( * args , **kwargs ) : #NEWLINE# #INDENT# path = args [ 0 ] #NEWLINE# return ( True if ( path [ ( path . rfind ( '.' ) + 1 ) : ] == ext ) else False ) #NEWLINE# #UNINDENT# self . _pathutils . exists = mock_exists #NEWLINE# configdrive_path = self . _pathutils . lookup_configdrive_path ( self . fake_instance_name , rescue ) #NEWLINE# return rescue