#NEWLINE# def test_list_master_success( self ) : #NEWLINE# #INDENT# '\n        Test if list_master succeeds.\n        ' #NEWLINE# files = [ 'cheesse/saltines.sls' , 'cheese/biscuits.sls' ] #NEWLINE# ret = files #NEWLINE# class MockFileClient ( object ) : #NEWLINE# #INDENT# def file_list( self , saltenv , prefix ) : #NEWLINE# #INDENT# return files #NEWLINE# #UNINDENT# #UNINDENT# mock_file_client = MockFileClient ( ) #NEWLINE# with patch . dict ( cp . __context__ , { #NEWLINE# #INDENT# 'cp.fileclient' : mock_file_client , #NEWLINE# #UNINDENT# } ) : #NEWLINE# #INDENT# self . assertEqual ( cp . list_master ( ) , ret )