

@patch('salt.modules.win_certutil.get_cert_serial')
def test_del_store(self, cert_serial_mock):
    '\n            Test removing a certificate to a specific store\n        '
    cmd_mock = MagicMock(return_value='CertInfo\r\nSerial: XYZABC\r\nOtherStuff')
    cache_mock = MagicMock(return_value='/tmp/cert.cer')
    cert_serial_mock.return_value = 'ABCDEF'
    with patch.dict(certutil.__salt__, {
        'cmd.run': cmd_mock,
        'cp.cache_file': cache_mock,
    }):
        certutil.del_store('salt://path/to/file', 'TrustedPublisher')
        cmd_mock.assert_called_once_with('certutil.exe -delstore TrustedPublisher ABCDEF')
        cache_mock.assert_called_once_with('salt://path/to/file', 'base')

dataset/ETHPy150Open saltstack/salt/tests/unit/modules/win_certutil_test.py CertUtilTestCase.test_del_store/original