From ee0561a0615b61b14bf15816bab335e4c9a55847 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Wed, 30 Mar 2022 07:39:34 -0400 Subject: [PATCH] Agent: Move MockPuppet to unit test suite The MockPuppet is now only used by the unit tests. --- .../unit_tests/infection_monkey/master}/mock_puppet.py | 0 .../unit_tests/infection_monkey/master/test_exploiter.py | 2 +- .../unit_tests/infection_monkey/master/test_ip_scanner.py | 5 ++--- 3 files changed, 3 insertions(+), 4 deletions(-) rename monkey/{infection_monkey/puppet => tests/unit_tests/infection_monkey/master}/mock_puppet.py (100%) diff --git a/monkey/infection_monkey/puppet/mock_puppet.py b/monkey/tests/unit_tests/infection_monkey/master/mock_puppet.py similarity index 100% rename from monkey/infection_monkey/puppet/mock_puppet.py rename to monkey/tests/unit_tests/infection_monkey/master/mock_puppet.py diff --git a/monkey/tests/unit_tests/infection_monkey/master/test_exploiter.py b/monkey/tests/unit_tests/infection_monkey/master/test_exploiter.py index eba0186a4..3c76c903f 100644 --- a/monkey/tests/unit_tests/infection_monkey/master/test_exploiter.py +++ b/monkey/tests/unit_tests/infection_monkey/master/test_exploiter.py @@ -5,10 +5,10 @@ from typing import Iterable from unittest.mock import MagicMock import pytest +from tests.unit_tests.infection_monkey.master.mock_puppet import MockPuppet from infection_monkey.master import Exploiter from infection_monkey.model import VictimHost -from infection_monkey.puppet.mock_puppet import MockPuppet logger = logging.getLogger() diff --git a/monkey/tests/unit_tests/infection_monkey/master/test_ip_scanner.py b/monkey/tests/unit_tests/infection_monkey/master/test_ip_scanner.py index c6aa0d532..9fafdaee2 100644 --- a/monkey/tests/unit_tests/infection_monkey/master/test_ip_scanner.py +++ b/monkey/tests/unit_tests/infection_monkey/master/test_ip_scanner.py @@ -3,11 +3,11 @@ from typing import Set from unittest.mock import MagicMock import pytest +from tests.unit_tests.infection_monkey.master.mock_puppet import MockPuppet from infection_monkey.i_puppet import FingerprintData, PortScanData, PortStatus from infection_monkey.master import IPScanner from infection_monkey.network import NetworkAddress -from infection_monkey.puppet.mock_puppet import MockPuppet WINDOWS_OS = "windows" LINUX_OS = "linux" @@ -34,8 +34,7 @@ def scan_config(): {"name": "HTTPFinger", "options": {}}, {"name": "SMBFinger", "options": {}}, {"name": "SSHFinger", "options": {}}, - ] - + ], }