Fix test_encrypt.py unit test (#86180)

This commit is contained in:
David Shrewsbury
2025-11-12 09:54:25 -05:00
committed by GitHub
parent 83d2ce771c
commit dc3cc0f9ea

View File

@@ -286,7 +286,7 @@ class TestCryptHash:
"""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
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
crypt_hash = encrypt.CryptHash("sha256_crypt")