Skip to content

Commit 719053b

Browse files
committed
renamed class name to master_key_mgr
1 parent 95a4c10 commit 719053b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/sonic-py-common/sonic_py_common/security_cipher.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
import os
1414
from swsscommon.swsscommon import ConfigDBConnector
1515

16-
class security_cipher:
16+
class master_key_mgr:
1717
_instance = None
1818
_lock = threading.Lock()
1919
_initialized = False
2020

2121
def __new__(cls):
2222
with cls._lock:
2323
if cls._instance is None:
24-
cls._instance = super(security_cipher, cls).__new__(cls)
24+
cls._instance = super(master_key_mgr, cls).__new__(cls)
2525
cls._instance._initialized = False
2626
return cls._instance
2727

src/sonic-py-common/tests/test_security_cipher.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import mock
77

88
import pytest
9-
from sonic_py_common.security_cipher import security_cipher
9+
from sonic_py_common.security_cipher import master_key_mgr
1010
from .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

Comments
 (0)