forked from p34709852/monkey
UT: Remove testing disabled attack techniques
This commit is contained in:
parent
4e98baf6e3
commit
c7a1c9d21d
|
@ -3,10 +3,7 @@ from enum import Enum
|
|||
import pytest
|
||||
|
||||
from common.utils.attack_utils import ScanStatus
|
||||
from monkey_island.cc.services.attack.technique_reports.__init__ import (
|
||||
AttackTechnique,
|
||||
disabled_msg,
|
||||
)
|
||||
from monkey_island.cc.services.attack.technique_reports.__init__ import AttackTechnique
|
||||
|
||||
|
||||
@pytest.fixture(scope="function", autouse=True)
|
||||
|
@ -68,13 +65,6 @@ class ExpectedMsgs_OneRelevantSystem(Enum):
|
|||
USED: str = "USED"
|
||||
|
||||
|
||||
def test_get_message_by_status_disabled_two_relevant_systems():
|
||||
technique_msg = FakeAttackTechnique_TwoRelevantSystems.get_message_by_status(
|
||||
ScanStatus.DISABLED.value
|
||||
)
|
||||
assert technique_msg == disabled_msg
|
||||
|
||||
|
||||
def test_get_message_by_status_unscanned_two_relevant_systems():
|
||||
technique_msg = FakeAttackTechnique_TwoRelevantSystems.get_message_by_status(
|
||||
ScanStatus.UNSCANNED.value
|
||||
|
@ -96,13 +86,6 @@ def test_get_message_by_status_used_two_relevant_systems():
|
|||
assert technique_msg == ExpectedMsgs_TwoRelevantSystems.USED.value
|
||||
|
||||
|
||||
def test_get_message_by_status_disabled_one_relevant_system():
|
||||
technique_msg = FakeAttackTechnique_OneRelevantSystem.get_message_by_status(
|
||||
ScanStatus.DISABLED.value
|
||||
)
|
||||
assert technique_msg == disabled_msg
|
||||
|
||||
|
||||
def test_get_message_by_status_unscanned_one_relevant_system():
|
||||
technique_msg = FakeAttackTechnique_OneRelevantSystem.get_message_by_status(
|
||||
ScanStatus.UNSCANNED.value
|
||||
|
|
|
@ -22,9 +22,6 @@ def patch_dependencies(monkeypatch_session):
|
|||
monkeypatch_session.setattr(
|
||||
"monkey_island.cc.services.config.ConfigService.init_config", lambda: None
|
||||
)
|
||||
monkeypatch_session.setattr(
|
||||
"monkey_island.cc.services.attack.attack_config.AttackConfig.reset_config", lambda: None
|
||||
)
|
||||
monkeypatch_session.setattr(
|
||||
"monkey_island.cc.services.database.jsonify", MagicMock(return_value=True)
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue