UT: Remove more unused `request` parameters

This commit is contained in:
Kekoa Kaaikala 2022-09-30 19:49:16 +00:00
parent 24684bf904
commit 28560bd65d
1 changed files with 3 additions and 3 deletions

View File

@ -166,7 +166,7 @@ def handler(scan_event_handler, request):
[(PING_SCAN_EVENT, HANDLE_PING_SCAN_METHOD), (TCP_SCAN_EVENT, HANDLE_TCP_SCAN_METHOD)], [(PING_SCAN_EVENT, HANDLE_PING_SCAN_METHOD), (TCP_SCAN_EVENT, HANDLE_TCP_SCAN_METHOD)],
indirect=["handler"], indirect=["handler"],
) )
def test_target_machine_not_exists(event, handler, machine_repository: IMachineRepository, request): def test_target_machine_not_exists(event, handler, machine_repository: IMachineRepository):
machine_repository.get_machines_by_ip = MagicMock(side_effect=UnknownRecordError) machine_repository.get_machines_by_ip = MagicMock(side_effect=UnknownRecordError)
handler(event) handler(event)
@ -249,14 +249,14 @@ def test_node_not_upserted_if_machine_retrievalerror(
], ],
indirect=["handler"], indirect=["handler"],
) )
def test_machine_not_upserted(event, handler, machine_repository: IMachineRepository, request): def test_machine_not_upserted(event, handler, machine_repository: IMachineRepository):
handler(event) handler(event)
assert not machine_repository.upsert_machine.called assert not machine_repository.upsert_machine.called
def test_machine_not_upserted_if_existing_machine_has_os( def test_machine_not_upserted_if_existing_machine_has_os(
scan_event_handler, machine_repository: IMachineRepository, request scan_event_handler, machine_repository: IMachineRepository
): ):
machine_with_os = TARGET_MACHINE machine_with_os = TARGET_MACHINE
machine_with_os.operating_system = OperatingSystem.WINDOWS machine_with_os.operating_system = OperatingSystem.WINDOWS