def test_cache_files_success(self):
        paths = ['salt://saltines', 'salt://biscuits']
        saltenv = 'base'
        ret = paths

        class MockFileClient(object):
            def cache_files(self, paths, saltenv):
                return paths

        mock_file_client = MockFileClient()
        with patch.dict(cp.__context__, {'cp.fileclient': mock_file_client}):
            self.assertEqual(cp.cache_files(paths), ret)
Test if cache_files succeeds.
dataset/ETHPy150Open saltstack/salt/tests/unit/modules/cp_test.py/CpTestCase.test_cache_files_success