UT: Remove unused constants from test_mongo_credentials_repository
This commit is contained in:
parent
7bf80946ba
commit
424022d58a
|
@ -8,41 +8,13 @@ from pymongo.collection import Collection
|
||||||
from pymongo.database import Database
|
from pymongo.database import Database
|
||||||
from tests.data_for_tests.propagation_credentials import PROPAGATION_CREDENTIALS
|
from tests.data_for_tests.propagation_credentials import PROPAGATION_CREDENTIALS
|
||||||
|
|
||||||
from common.credentials import Credentials, LMHash, NTHash, Password, SSHKeypair, Username
|
from common.credentials import Credentials
|
||||||
from monkey_island.cc.repository import MongoCredentialsRepository
|
from monkey_island.cc.repository import MongoCredentialsRepository
|
||||||
from monkey_island.cc.server_utils.encryption import ILockableEncryptor
|
from monkey_island.cc.server_utils.encryption import ILockableEncryptor
|
||||||
|
|
||||||
USER1 = "test_user_1"
|
|
||||||
USER2 = "test_user_2"
|
|
||||||
USER3 = "test_user_3"
|
|
||||||
PASSWORD = "12435"
|
|
||||||
PASSWORD2 = "password"
|
|
||||||
PASSWORD3 = "lozinka"
|
|
||||||
LM_HASH = "AEBD4DE384C7EC43AAD3B435B51404EE"
|
|
||||||
NT_HASH = "7A21990FCD3D759941E45C490F143D5F"
|
|
||||||
PUBLIC_KEY = "MY_PUBLIC_KEY"
|
|
||||||
PRIVATE_KEY = "MY_PRIVATE_KEY"
|
|
||||||
|
|
||||||
IDENTITIES_1 = (Username(USER1), Username(USER2))
|
|
||||||
SECRETS_1 = (
|
|
||||||
Password(PASSWORD),
|
|
||||||
LMHash(LM_HASH),
|
|
||||||
NTHash(NT_HASH),
|
|
||||||
SSHKeypair(PRIVATE_KEY, PUBLIC_KEY),
|
|
||||||
)
|
|
||||||
CREDENTIALS_OBJECT_1 = Credentials(IDENTITIES_1, SECRETS_1)
|
|
||||||
|
|
||||||
IDENTITIES_2 = (Username(USER3),)
|
|
||||||
SECRETS_2 = (Password(PASSWORD2), Password(PASSWORD3))
|
|
||||||
CREDENTIALS_OBJECT_2 = Credentials(IDENTITIES_2, SECRETS_2)
|
|
||||||
|
|
||||||
|
|
||||||
CONFIGURED_CREDENTIALS = PROPAGATION_CREDENTIALS[0:3]
|
CONFIGURED_CREDENTIALS = PROPAGATION_CREDENTIALS[0:3]
|
||||||
|
|
||||||
STOLEN_CREDENTIALS = PROPAGATION_CREDENTIALS[3:6]
|
STOLEN_CREDENTIALS = PROPAGATION_CREDENTIALS[3:6]
|
||||||
|
|
||||||
CREDENTIALS_LIST = [CREDENTIALS_OBJECT_1, CREDENTIALS_OBJECT_2]
|
|
||||||
|
|
||||||
|
|
||||||
def reverse(data: bytes) -> bytes:
|
def reverse(data: bytes) -> bytes:
|
||||||
return bytes(reversed(data))
|
return bytes(reversed(data))
|
||||||
|
|
Loading…
Reference in New Issue