mirror of
https://github.com/ansible/ansible.git
synced 2025-11-30 23:16:08 +07:00
Fix test_encrypt.py unit test (#86180)
This commit is contained in:
@@ -286,7 +286,7 @@ class TestCryptHash:
|
|||||||
"""Test AnsibleError is raised when crypt library does not support an Ansible supported algorithm."""
|
"""Test AnsibleError is raised when crypt library does not support an Ansible supported algorithm."""
|
||||||
# Pretend we have a crypt lib that doesn't like our algo
|
# Pretend we have a crypt lib that doesn't like our algo
|
||||||
mocker.patch('ansible.utils.encrypt.HAS_CRYPT', True)
|
mocker.patch('ansible.utils.encrypt.HAS_CRYPT', True)
|
||||||
mocker.patch('ansible._internal._encryption._crypt.crypt', side_effect=ValueError)
|
mocker.patch('ansible._internal._encryption._crypt.CryptFacade.crypt', side_effect=ValueError)
|
||||||
|
|
||||||
# instantiate with an Ansible supported algo
|
# instantiate with an Ansible supported algo
|
||||||
crypt_hash = encrypt.CryptHash("sha256_crypt")
|
crypt_hash = encrypt.CryptHash("sha256_crypt")
|
||||||
|
|||||||
Reference in New Issue
Block a user