From 0b2039fb76c2c3c9fea336159cb86c217eefa9a3 Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Thu, 15 Sep 2022 12:30:39 +0530 Subject: [PATCH] UT: Remove test_credentials_telem.py --- .../telemetry/test_credentials_telem.py | 34 ------------------- 1 file changed, 34 deletions(-) delete mode 100644 monkey/tests/unit_tests/infection_monkey/telemetry/test_credentials_telem.py diff --git a/monkey/tests/unit_tests/infection_monkey/telemetry/test_credentials_telem.py b/monkey/tests/unit_tests/infection_monkey/telemetry/test_credentials_telem.py deleted file mode 100644 index 6727e3fd5..000000000 --- a/monkey/tests/unit_tests/infection_monkey/telemetry/test_credentials_telem.py +++ /dev/null @@ -1,34 +0,0 @@ -import json - -import pytest - -from common.credentials import Credentials, Password, Username -from infection_monkey.telemetry.credentials_telem import CredentialsTelem - -USERNAME = "m0nkey" -PASSWORD = "mmm" -PUBLIC_KEY = "pub_key" -PRIVATE_KEY = "priv_key" - - -@pytest.fixture -def credentials_for_test(): - return Credentials(identity=Username(username=USERNAME), secret=Password(password=PASSWORD)) - - -def test_credential_telem_send(spy_send_telemetry, credentials_for_test): - - expected_data = [credentials_for_test.dict(simplify=True)] - - telem = CredentialsTelem([credentials_for_test]) - telem.send() - - assert json.loads(spy_send_telemetry.data) == expected_data - assert spy_send_telemetry.telem_category == "credentials" - - -def test_credentials_property(credentials_for_test): - telem = CredentialsTelem([credentials_for_test]) - - assert len(list(telem.credentials)) == 1 - assert list(telem.credentials)[0] == credentials_for_test