#NEWLINE# @ patch ( 'os.path.isfile' , MagicMock ( return_value = True ) ) #NEWLINE# def test_push_dir_file_success( self ) : #NEWLINE# #INDENT# '\n        Test if push_dir succeeds on a file.\n        ' #NEWLINE# path = '/srv/salt/saltines' #NEWLINE# ret = True #NEWLINE# with patch ( 'salt.modules.cp.push' , MagicMock ( return_value = True ) ) : #NEWLINE# #INDENT# self . assertEqual ( cp . push_dir ( path ) , path )