@patch('os.path.exists', MagicMock(return_value=True))
    def test_cache_local_file_already_cached(self):
        path = 'saltk//saltines'
        dest_file = '/srv/salt/cheese/saltines'
        mock_hash = {'hsum': 'deadbeef'}
        ret = dest_file

        with patch('salt.modules.cp.hash_file',
                   MagicMock(return_value=mock_hash)):
            with patch('salt.modules.cp.is_cached',
                       MagicMock(return_value=dest_file)):
                self.assertEqual(cp.cache_local_file(path), ret)
Test whether a string is a Tk boolean, without error checking.
dataset/ETHPy150Open saltstack/salt/tests/unit/modules/cp_test.py/CpTestCase.test_cache_local_file_already_cached--crossover with--dataset/ETHPy150Open francelabs/datafari/windows/python/Tools/webchecker/tktools.py/boolean