66 import mock
77
88import pytest
9- from sonic_py_common .security_cipher import security_cipher
9+ from sonic_py_common .security_cipher import master_key_mgr
1010from .mock_swsscommon import ConfigDBConnector
1111
1212# TODO: Remove this if/else block once we no longer support Python 2
@@ -35,7 +35,7 @@ def test_passkey_encryption(self):
3535 with mock .patch ("sonic_py_common.security_cipher.ConfigDBConnector" , new = ConfigDBConnector ), \
3636 mock .patch ("os.chmod" ) as mock_chmod , \
3737 mock .patch ("{}.open" .format (BUILTINS ),mock .mock_open ()) as mock_file :
38- temp = security_cipher ()
38+ temp = master_key_mgr ()
3939
4040 # Use patch to replace the built-in 'open' function with a mock
4141 with mock .patch ("{}.open" .format (BUILTINS ), mock .mock_open ()) as mock_file , \
@@ -50,7 +50,7 @@ def test_passkey_decryption(self):
5050 with mock .patch ("sonic_py_common.security_cipher.ConfigDBConnector" , new = ConfigDBConnector ), \
5151 mock .patch ("os.chmod" ) as mock_chmod , \
5252 mock .patch ("{}.open" .format (BUILTINS ), mock .mock_open ()) as mock_file :
53- temp = security_cipher ()
53+ temp = master_key_mgr ()
5454
5555 # Use patch to replace the built-in 'open' function with a mock
5656 with mock .patch ("{}.open" .format (BUILTINS ), mock .mock_open ()) as mock_file , \
0 commit comments