UT: Move mock_agent_event_queue into conftest.py

This commit is contained in:
Mike Salvatore 2022-09-29 14:32:20 -04:00
parent 3dc6eba2da
commit 4b3402f7a8
2 changed files with 10 additions and 6 deletions

View File

@ -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)

View File

@ -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