From 37885b786f460e0b806462e2b79989be83f033fc Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Wed, 13 Jul 2022 11:09:46 -0400 Subject: [PATCH] UT: Add missing type hints to test_repository_service --- .../monkey_island/cc/services/test_repository_service.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/monkey/tests/unit_tests/monkey_island/cc/services/test_repository_service.py b/monkey/tests/unit_tests/monkey_island/cc/services/test_repository_service.py index adc07eb2e..17dd6ffb5 100644 --- a/monkey/tests/unit_tests/monkey_island/cc/services/test_repository_service.py +++ b/monkey/tests/unit_tests/monkey_island/cc/services/test_repository_service.py @@ -13,7 +13,7 @@ WINDOWS_FILENAME = "windows_pba_file.ps1" @pytest.fixture -def agent_configuration(default_agent_configuration) -> AgentConfiguration: +def agent_configuration(default_agent_configuration: AgentConfiguration) -> AgentConfiguration: custom_pbas = replace( default_agent_configuration.custom_pbas, linux_filename=LINUX_FILENAME, @@ -23,7 +23,9 @@ def agent_configuration(default_agent_configuration) -> AgentConfiguration: @pytest.fixture -def agent_configuration_repository(agent_configuration) -> IAgentConfigurationRepository: +def agent_configuration_repository( + agent_configuration: AgentConfiguration, +) -> IAgentConfigurationRepository: agent_configuration_repository = InMemoryAgentConfigurationRepository() agent_configuration_repository.store_configuration(agent_configuration) @@ -31,7 +33,7 @@ def agent_configuration_repository(agent_configuration) -> IAgentConfigurationRe @pytest.fixture -def mock_file_repository(): +def mock_file_repository() -> IFileRepository: return MagicMock(spec=IFileRepository)