Update tests to use alertstore instead of detected attribute

This commit is contained in:
Janik Besendorf
2025-11-07 16:46:20 +01:00
parent af8c56675b
commit 301582d7dd
3 changed files with 6 additions and 3 deletions

View File

@@ -94,4 +94,6 @@ class TestAndroidqfMountsModule:
assert len(m.results) == 0, (
f"Expected no results when mounts.json is absent, got: {m.results}"
)
assert len(m.detected) == 0, f"Expected no detections, got: {m.detected}"
assert len(m.alertstore.alerts) == 0, (
f"Expected no detections, got: {m.alertstore.alerts}"
)

View File

@@ -42,7 +42,7 @@ class TestAndroidqfRootBinaries:
# Should find 4 root binaries from the test file
assert len(module.results) == 4
assert len(module.detected) == 4
assert len(module.alertstore.alerts) == 4
# Check that all results are detected as indicators
binary_paths = [result["path"] for result in module.results]
@@ -113,4 +113,4 @@ class TestAndroidqfRootBinaries:
run_module(m)
assert len(m.results) == 0
assert len(m.detected) == 0
assert len(m.alertstore.alerts) == 0

View File

@@ -9,6 +9,7 @@ from pathlib import Path
from mvt.android.modules.bugreport.dumpsys_appops import DumpsysAppops
from mvt.android.modules.bugreport.dumpsys_getprop import DumpsysGetProp
from mvt.android.modules.bugreport.dumpsys_packages import DumpsysPackages
from mvt.android.modules.bugreport.tombstones import Tombstones
from mvt.common.module import run_module
from ..utils import get_artifact_folder