Skip to content

Commit

Permalink
Tests: Decouple uses_encryptor() fixture from AuthenticationService
Browse files Browse the repository at this point in the history
  • Loading branch information
mssalvatore committed Oct 5, 2021
1 parent a249791 commit 8f92895
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions monkey/tests/unit_tests/monkey_island/cc/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
)

from monkey_island.cc.server_utils.encryption import initialize_datastore_encryptor
from monkey_island.cc.services.authentication import AuthenticationService


@pytest.fixture
Expand All @@ -28,11 +27,7 @@ def monkey_config_json(monkey_config):
return json.dumps(monkey_config)


MOCK_USERNAME = "m0nk3y_u53r"
MOCK_PASSWORD = "3cr3t_p455w0rd"


@pytest.fixture
def uses_encryptor(data_for_tests_dir):
secret = AuthenticationService._get_secret_from_credentials(MOCK_USERNAME, MOCK_PASSWORD)
secret = "m0nk3y_u53r:3cr3t_p455w0rd"
initialize_datastore_encryptor(data_for_tests_dir, secret)

0 comments on commit 8f92895

Please sign in to comment.