mirror of
https://github.com/mvt-project/mvt.git
synced 2026-06-01 04:31:41 +02:00
Fixed variable names mismatch and styling
This commit is contained in:
@@ -7,9 +7,9 @@ import logging
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
from mvt.android.modules.bugreport.appops import Appops
|
||||
from mvt.common.indicators import Indicators
|
||||
from mvt.common.module import run_module
|
||||
from mvt.android.modules.bugreport.appops import Appops
|
||||
|
||||
from ..utils import get_artifact_folder
|
||||
|
||||
|
||||
@@ -19,11 +19,11 @@ class TestDumpsysParsing:
|
||||
res = parse_dumpsys_appops(data)
|
||||
|
||||
assert len(res) == 12
|
||||
assert res[0]["package_id"] == "com.android.phone"
|
||||
assert res[0]["package_name"] == "com.android.phone"
|
||||
assert res[0]["uid"] == "0"
|
||||
assert len(res[0]["permissions"]) == 1
|
||||
assert res[0]["permissions"][0]["name"] == "MANAGE_IPSEC_TUNNELS"
|
||||
assert res[0]["permissions"][0]["access"] == "allow"
|
||||
assert res[6]["package_id"] == "com.sec.factory.camera"
|
||||
assert res[6]["package_name"] == "com.sec.factory.camera"
|
||||
assert len(res[6]["permissions"][1]["entries"]) == 1
|
||||
assert len(res[11]["permissions"]) == 4
|
||||
|
||||
@@ -4,17 +4,17 @@
|
||||
# https://license.mvt.re/1.1/
|
||||
|
||||
import os
|
||||
|
||||
from click.testing import CliRunner
|
||||
|
||||
from mvt.android.cli import check_bugreport
|
||||
|
||||
from .utils import get_artifact_folder
|
||||
|
||||
|
||||
class TestCheckBugreportCommand:
|
||||
def test_check(self):
|
||||
runner = CliRunner()
|
||||
path = os.path.join(get_artifact_folder(), "android_data/bugreport/")
|
||||
result = runner.invoke(check_bugreport, [path])
|
||||
assert result.exit_code == 0
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user