UT: removed telemetry encryption test

This commit is contained in:
vakarisz 2022-02-25 10:17:18 +02:00
parent 0ecfbff1e4
commit cf56fcbef2
1 changed files with 0 additions and 22 deletions

View File

@ -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():