diff --git a/monkey/tests/unit_tests/infection_monkey/network_scanning/conftest.py b/monkey/tests/unit_tests/infection_monkey/network_scanning/conftest.py new file mode 100644 index 000000000..5b614fbda --- /dev/null +++ b/monkey/tests/unit_tests/infection_monkey/network_scanning/conftest.py @@ -0,0 +1,10 @@ +from unittest.mock import MagicMock + +import pytest + +from common.event_queue import IAgentEventQueue + + +@pytest.fixture +def mock_agent_event_queue() -> IAgentEventQueue: + return MagicMock(spec=IAgentEventQueue) diff --git a/monkey/tests/unit_tests/infection_monkey/network_scanning/test_ping_scanner.py b/monkey/tests/unit_tests/infection_monkey/network_scanning/test_ping_scanner.py index 102df5dd1..ab6c76b5a 100644 --- a/monkey/tests/unit_tests/infection_monkey/network_scanning/test_ping_scanner.py +++ b/monkey/tests/unit_tests/infection_monkey/network_scanning/test_ping_scanner.py @@ -7,7 +7,6 @@ import pytest import infection_monkey.network_scanning.ping_scanner # noqa: F401 from common import OperatingSystem from common.agent_events import PingScanEvent -from common.event_queue import IAgentEventQueue from common.types import PingScanData from infection_monkey.network_scanning import ping from infection_monkey.network_scanning.ping_scanner import EMPTY_PING_SCAN @@ -99,11 +98,6 @@ def set_os_windows(monkeypatch): monkeypatch.setattr("sys.platform", "win32") -@pytest.fixture -def mock_agent_event_queue(): - return MagicMock(spec=IAgentEventQueue) - - HOST_IP = "192.168.1.1" TIMEOUT = 1.0