@patch('os.path.isdir', MagicMock(return_value=True))
    def test_recv_return_success(self):
        files = {'saltines': 'salt://saltines',
                 'biscuits': 'salt://biscuits'}
        ret = {'/srv/salt/cheese/saltines': True,
               '/srv/salt/cheese/biscuits': True}
        dest = '/srv/salt/cheese'
        file_data = 'Remember to keep your files well salted.'
        with patch('salt.utils.fopen', mock_open(read_data=file_data)):
            self.assertEqual(cp.recv(files, dest), ret)
Test if recv returns success.
dataset/ETHPy150Open saltstack/salt/tests/unit/modules/cp_test.py/CpTestCase.test_recv_return_success