forked from p34709852/monkey
UT: removed telemetry encryption test
This commit is contained in:
parent
0ecfbff1e4
commit
cf56fcbef2
|
@ -51,28 +51,6 @@ def fake_mongo(monkeypatch):
|
|||
monkeypatch.setattr("monkey_island.cc.models.telemetries.telemetry_dal.mongo", mongo)
|
||||
|
||||
|
||||
@pytest.mark.slow
|
||||
@pytest.mark.usefixtures("uses_database", "uses_encryptor")
|
||||
def test_telemetry_encryption():
|
||||
secret_keys = ["password", "lm_hash", "ntlm_hash"]
|
||||
|
||||
save_telemetry(MOCK_TELEMETRY)
|
||||
|
||||
encrypted_telemetry = Telemetry.objects.first()
|
||||
for user in MOCK_CREDENTIALS.keys():
|
||||
assert encrypted_telemetry["data"]["credentials"][user]["username"] == user
|
||||
|
||||
for s in secret_keys:
|
||||
assert encrypted_telemetry["data"]["credentials"][user][s] != MOCK_CREDENTIALS[user][s]
|
||||
|
||||
decrypted_telemetry = get_telemetry_by_query({})[0]
|
||||
for user in MOCK_CREDENTIALS.keys():
|
||||
assert decrypted_telemetry["data"]["credentials"][user]["username"] == user
|
||||
|
||||
for s in secret_keys:
|
||||
assert decrypted_telemetry["data"]["credentials"][user][s] == MOCK_CREDENTIALS[user][s]
|
||||
|
||||
|
||||
@pytest.mark.slow
|
||||
@pytest.mark.usefixtures("uses_database", "uses_encryptor")
|
||||
def test_no_encryption_needed():
|
||||
|
|
Loading…
Reference in New Issue