mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
fixing failing unit tests.
This commit is contained in:
parent
844563eb23
commit
84c0f3e689
1 changed files with 2 additions and 2 deletions
|
@ -65,7 +65,7 @@ def test_list_certs():
|
|||
out = keychain.list_certs("/path/to/cert.p12")
|
||||
mock.assert_called_once_with(
|
||||
"security find-certificate -a /path/to/cert.p12 | "
|
||||
'grep -o "alis".*\\" | grep -o \'\\"[-A-Za-z0-9.:() ]*\\"\'',
|
||||
'grep -o "alis.*" | grep -o \'\\"[-A-Za-z0-9.:() ]*\\"\'',
|
||||
python_shell=True,
|
||||
)
|
||||
|
||||
|
@ -79,7 +79,7 @@ def test_get_friendly_name():
|
|||
expected = "ID Installer Salt"
|
||||
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")
|
||||
out = keychain.get_friendly_name("/path/to/cert.p12", "passw0rd", legacy=True)
|
||||
mock.assert_called_once_with(
|
||||
"openssl pkcs12 -legacy -in /path/to/cert.p12 -passin pass:passw0rd -info "
|
||||
"-nodes -nokeys 2> /dev/null | grep friendlyName:",
|
||||
|
|
Loading…
Add table
Reference in a new issue