diff --git a/monkey/infection_monkey/telemetry/tests/test_post_breach_telem.py b/monkey/infection_monkey/telemetry/tests/test_post_breach_telem.py index adff1ca62..ebd085a8d 100644 --- a/monkey/infection_monkey/telemetry/tests/test_post_breach_telem.py +++ b/monkey/infection_monkey/telemetry/tests/test_post_breach_telem.py @@ -1,31 +1,24 @@ import pytest -from common.data.post_breach_consts import POST_BREACH_JOB_SCHEDULING -from infection_monkey.post_breach.actions.schedule_jobs import ScheduleJobs -from infection_monkey.post_breach.job_scheduling.linux_job_scheduling import ( - get_linux_commands_to_schedule_jobs, -) -from infection_monkey.post_breach.job_scheduling.windows_job_scheduling import ( - get_windows_commands_to_schedule_jobs, -) from infection_monkey.telemetry.post_breach_telem import PostBreachTelem -from infection_monkey.utils.environment import is_windows_os HOSTNAME = "hostname" IP = "0.0.0.0" -PBA = ScheduleJobs() -PBA_COMMAND = ( - get_windows_commands_to_schedule_jobs() - if is_windows_os() - else " ".join(get_linux_commands_to_schedule_jobs()) -) -PBA_NAME = POST_BREACH_JOB_SCHEDULING +PBA_COMMAND = "run some pba" +PBA_NAME = "some pba" RESULT = False +class StubSomePBA: + def __init__(self): + self.name = PBA_NAME + self.command = PBA_COMMAND + + @pytest.fixture def post_breach_telem_test_instance(monkeypatch): + PBA = StubSomePBA() monkeypatch.setattr(PostBreachTelem, "_get_hostname_and_ip", lambda: (HOSTNAME, IP)) return PostBreachTelem(PBA, RESULT)