def test_uninstall_cert(self):
        expected = {
            'changes': {'uninstalled': 'Friendly Name'},
            'comment': '',
            'name': '/path/to/cert.p12',
            'result': True
        }

        list_mock = MagicMock(return_value=['Friendly Name'])
        friendly_mock = MagicMock(return_value='Friendly Name')
        uninstall_mock = MagicMock(return_value='1 identity imported.')
        with patch.dict(keychain.__salt__, {'keychain.list_certs': list_mock,
                                            'keychain.get_friendly_name': friendly_mock,
                                            'keychain.uninstall': uninstall_mock}):
            out = keychain.uninstalled('/path/to/cert.p12', 'passw0rd')
            list_mock.assert_called_once_with('/Library/Keychains/System.keychain')
            friendly_mock.assert_called_once_with('/path/to/cert.p12', 'passw0rd')
            uninstall_mock.assert_called_once_with('Friendly Name', '/Library/Keychains/System.keychain', None)
            self.assertEqual(out, expected)
Recycle this session through the driver it came from.
dataset/ETHPy150Open saltstack/salt/tests/unit/states/mac_keychain_test.py/KeychainTestCase.test_uninstall_cert--crossover with--dataset/ETHPy150Open nigelsmall/py2neo/py2neo/packages/neo4j/v1/session.py/Session.close