From 794277797b58d93e8507fd3339f651e72838e4c1 Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Wed, 6 Jul 2022 14:48:01 +0200 Subject: [PATCH] UT: Rename PropagationCredentialsRepository to StubPropagationCredentialsRepository --- monkey/tests/monkey_island/__init__.py | 2 +- ...pository.py => stub_propagation_credentials_repository.py} | 2 +- .../cc/resources/test_propagation_credentials.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) rename monkey/tests/monkey_island/{propagation_credentials_repository.py => stub_propagation_credentials_repository.py} (96%) diff --git a/monkey/tests/monkey_island/__init__.py b/monkey/tests/monkey_island/__init__.py index 1f3305665..df36a5d01 100644 --- a/monkey/tests/monkey_island/__init__.py +++ b/monkey/tests/monkey_island/__init__.py @@ -3,4 +3,4 @@ from .mock_file_repository import MockFileRepository, FILE_CONTENTS, FILE_NAME from .open_error_file_repository import OpenErrorFileRepository from .in_memory_agent_configuration_repository import InMemoryAgentConfigurationRepository from .in_memory_simulation_configuration import InMemorySimulationRepository -from .propagation_credentials_repository import PropagationCredentialsRepository +from .stub_propagation_credentials_repository import StubPropagationCredentialsRepository diff --git a/monkey/tests/monkey_island/propagation_credentials_repository.py b/monkey/tests/monkey_island/stub_propagation_credentials_repository.py similarity index 96% rename from monkey/tests/monkey_island/propagation_credentials_repository.py rename to monkey/tests/monkey_island/stub_propagation_credentials_repository.py index 4ac1350fc..3e3978e36 100644 --- a/monkey/tests/monkey_island/propagation_credentials_repository.py +++ b/monkey/tests/monkey_island/stub_propagation_credentials_repository.py @@ -32,7 +32,7 @@ propagation_credentials_2 = { } -class PropagationCredentialsRepository(ICredentialsRepository): +class StubPropagationCredentialsRepository(ICredentialsRepository): def get_configured_credentials(self) -> Sequence[Credentials]: pass diff --git a/monkey/tests/unit_tests/monkey_island/cc/resources/test_propagation_credentials.py b/monkey/tests/unit_tests/monkey_island/cc/resources/test_propagation_credentials.py index 374a6db9c..26e9fb233 100644 --- a/monkey/tests/unit_tests/monkey_island/cc/resources/test_propagation_credentials.py +++ b/monkey/tests/unit_tests/monkey_island/cc/resources/test_propagation_credentials.py @@ -2,7 +2,7 @@ import json import pytest from tests.common import StubDIContainer -from tests.monkey_island import PropagationCredentialsRepository +from tests.monkey_island import StubPropagationCredentialsRepository from tests.unit_tests.monkey_island.conftest import get_url_for_resource from monkey_island.cc.repository import ICredentialsRepository @@ -13,7 +13,7 @@ from monkey_island.cc.resources.propagation_credentials import PropagationCreden def flask_client(build_flask_client): container = StubDIContainer() - container.register(ICredentialsRepository, PropagationCredentialsRepository) + container.register(ICredentialsRepository, StubPropagationCredentialsRepository) with build_flask_client(container) as flask_client: yield flask_client