forked from p15670423/monkey
UT: Move mock_agent_event_queue into conftest.py
This commit is contained in:
parent
3dc6eba2da
commit
4b3402f7a8
|
@ -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)
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue