Update test_mac_keychain.py

Need to recreate the mock to ensure the number of calls is correct.
This commit is contained in:
Gareth J. Greenaway 2023-11-17 21:41:43 -08:00 committed by Daniel Wozniak
parent c23df2a2d5
commit b5b1ee0ff1

View file

@ -88,6 +88,7 @@ def test_get_friendly_name():
assert out == expected
mock = MagicMock(return_value="friendlyName: ID Installer Salt")
with patch.dict(keychain.__salt__, {"cmd.run": mock}):
out = keychain.get_friendly_name("/path/to/cert.p12", "passw0rd", legacy=False)
mock.assert_called_once_with(