mirror of
https://github.com/mvt-project/mvt.git
synced 2026-02-12 16:42:45 +00:00
Add missed modules using updated settings module
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
import logging
|
||||
import os
|
||||
|
||||
|
||||
from mvt.common.config import settings
|
||||
from mvt.common.indicators import Indicators
|
||||
from ..utils import get_artifact_folder
|
||||
|
||||
@@ -100,6 +102,8 @@ class TestIndicators:
|
||||
|
||||
def test_env_stix(self, indicator_file):
|
||||
os.environ["MVT_STIX2"] = indicator_file
|
||||
settings.__init__() # Reset settings
|
||||
|
||||
ind = Indicators(log=logging)
|
||||
ind.load_indicators_files([], load_default=False)
|
||||
assert ind.total_ioc_count == 9
|
||||
|
||||
@@ -8,6 +8,7 @@ import os
|
||||
from click.testing import CliRunner
|
||||
|
||||
from mvt.android.cli import check_androidqf
|
||||
from mvt.common.config import settings
|
||||
|
||||
from .utils import get_artifact_folder
|
||||
|
||||
@@ -56,6 +57,8 @@ class TestCheckAndroidqfCommand:
|
||||
)
|
||||
|
||||
os.environ["MVT_ANDROID_BACKUP_PASSWORD"] = TEST_BACKUP_PASSWORD
|
||||
settings.__init__() # Reset settings
|
||||
|
||||
runner = CliRunner()
|
||||
path = os.path.join(get_artifact_folder(), "androidqf_encrypted")
|
||||
result = runner.invoke(check_androidqf, [path])
|
||||
@@ -63,3 +66,4 @@ class TestCheckAndroidqfCommand:
|
||||
assert prompt_mock.call_count == 0
|
||||
assert result.exit_code == 0
|
||||
del os.environ["MVT_ANDROID_BACKUP_PASSWORD"]
|
||||
settings.__init__() # Reset settings
|
||||
|
||||
@@ -9,6 +9,7 @@ import os
|
||||
from click.testing import CliRunner
|
||||
|
||||
from mvt.android.cli import check_backup
|
||||
from mvt.common.config import settings
|
||||
|
||||
from .utils import get_artifact_folder
|
||||
|
||||
@@ -63,6 +64,8 @@ class TestCheckAndroidBackupCommand:
|
||||
)
|
||||
|
||||
os.environ["MVT_ANDROID_BACKUP_PASSWORD"] = TEST_BACKUP_PASSWORD
|
||||
settings.__init__() # Reset settings
|
||||
|
||||
runner = CliRunner()
|
||||
path = os.path.join(get_artifact_folder(), "androidqf_encrypted/backup.ab")
|
||||
result = runner.invoke(check_backup, [path])
|
||||
@@ -70,3 +73,4 @@ class TestCheckAndroidBackupCommand:
|
||||
assert prompt_mock.call_count == 0
|
||||
assert result.exit_code == 0
|
||||
del os.environ["MVT_ANDROID_BACKUP_PASSWORD"]
|
||||
settings.__init__() # Reset settings
|
||||
|
||||
Reference in New Issue
Block a user