@patch('os.path.isfile', MagicMock(return_value=True))
    def test_push_dir_file_success(self):
        path = '/srv/salt/saltines'
        ret = True

        with patch('salt.modules.cp.push', MagicMock(return_value=True)):
            self.assertEqual(cp.push_dir(path), ret)
Test if push_dir succeeds on a file.
dataset/ETHPy150Open saltstack/salt/tests/unit/modules/cp_test.py/CpTestCase.test_push_dir_file_success