mirror of
https://github.com/mvt-project/mvt.git
synced 2026-07-11 07:13:45 +02:00
Update tests to use alertstore instead of detected attribute
This commit is contained in:
@@ -94,4 +94,6 @@ class TestAndroidqfMountsModule:
|
|||||||
assert len(m.results) == 0, (
|
assert len(m.results) == 0, (
|
||||||
f"Expected no results when mounts.json is absent, got: {m.results}"
|
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}"
|
||||||
|
)
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class TestAndroidqfRootBinaries:
|
|||||||
|
|
||||||
# Should find 4 root binaries from the test file
|
# Should find 4 root binaries from the test file
|
||||||
assert len(module.results) == 4
|
assert len(module.results) == 4
|
||||||
assert len(module.detected) == 4
|
assert len(module.alertstore.alerts) == 4
|
||||||
|
|
||||||
# Check that all results are detected as indicators
|
# Check that all results are detected as indicators
|
||||||
binary_paths = [result["path"] for result in module.results]
|
binary_paths = [result["path"] for result in module.results]
|
||||||
@@ -113,4 +113,4 @@ class TestAndroidqfRootBinaries:
|
|||||||
run_module(m)
|
run_module(m)
|
||||||
|
|
||||||
assert len(m.results) == 0
|
assert len(m.results) == 0
|
||||||
assert len(m.detected) == 0
|
assert len(m.alertstore.alerts) == 0
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ from pathlib import Path
|
|||||||
from mvt.android.modules.bugreport.dumpsys_appops import DumpsysAppops
|
from mvt.android.modules.bugreport.dumpsys_appops import DumpsysAppops
|
||||||
from mvt.android.modules.bugreport.dumpsys_getprop import DumpsysGetProp
|
from mvt.android.modules.bugreport.dumpsys_getprop import DumpsysGetProp
|
||||||
from mvt.android.modules.bugreport.dumpsys_packages import DumpsysPackages
|
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 mvt.common.module import run_module
|
||||||
|
|
||||||
from ..utils import get_artifact_folder
|
from ..utils import get_artifact_folder
|
||||||
|
|||||||
Reference in New Issue
Block a user