TEST: scan processing 3

Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
jokob-sk
2026-02-06 18:06:57 +11:00
parent ac5224747e
commit d38dcda35b

View File

@@ -68,17 +68,14 @@ def scan_db():
@pytest.fixture @pytest.fixture
def minimal_patches(): def minimal_patches():
"""Patch unrelated pipeline steps."""
with patch.multiple( with patch.multiple(
"scan.session_events", # <-- target module "scan.session_events",
exclude_ignored_devices=Mock(), exclude_ignored_devices=Mock(),
save_scanned_devices=Mock(), save_scanned_devices=Mock(),
print_scan_stats=Mock(), print_scan_stats=Mock(),
create_new_devices=Mock(), create_new_devices=Mock(),
update_devices_data_from_scan=Mock(), update_devices_data_from_scan=Mock(),
update_devLastConnection_from_CurrentScan=Mock(), update_devLastConnection_from_CurrentScan=Mock(),
update_devPresentLastScan_based_on_nics=Mock(),
update_devPresentLastScan_based_on_force_status=Mock(),
update_vendors_from_mac=Mock(), update_vendors_from_mac=Mock(),
update_ipv4_ipv6=Mock(), update_ipv4_ipv6=Mock(),
update_icons_and_types=Mock(), update_icons_and_types=Mock(),
@@ -87,7 +84,7 @@ def minimal_patches():
insertOnlineHistory=Mock(), insertOnlineHistory=Mock(),
skip_repeated_notifications=Mock(), skip_repeated_notifications=Mock(),
update_unread_notifications_count=Mock(), update_unread_notifications_count=Mock(),
insert_events=Mock(), # insert_events optionally mocked depending on test
): ):
yield yield