forked from p34709852/monkey
UT: Simplify assertion logic in common/agent_configuration/test_agent_configuration.py
This commit is contained in:
parent
6460639f91
commit
9db1a19ad3
|
@ -23,7 +23,6 @@ from tests.common.example_agent_configuration import (
|
|||
WINDOWS_COMMAND,
|
||||
WINDOWS_FILENAME,
|
||||
)
|
||||
from tests.utils import convert_all_lists_to_tuples_in_mapping
|
||||
|
||||
from common.agent_configuration.agent_configuration import AgentConfiguration
|
||||
from common.agent_configuration.agent_sub_configurations import (
|
||||
|
@ -210,7 +209,7 @@ def test_exploitation_configuration():
|
|||
config_dict = config.dict(simplify=True)
|
||||
|
||||
assert isinstance(config, ExploitationConfiguration)
|
||||
assert config_dict == convert_all_lists_to_tuples_in_mapping(EXPLOITATION_CONFIGURATION.copy())
|
||||
assert config_dict == EXPLOITATION_CONFIGURATION
|
||||
|
||||
|
||||
def test_propagation_configuration():
|
||||
|
@ -221,7 +220,7 @@ def test_propagation_configuration():
|
|||
assert isinstance(config.network_scan, NetworkScanConfiguration)
|
||||
assert isinstance(config.exploitation, ExploitationConfiguration)
|
||||
assert config.maximum_depth == 5
|
||||
assert config_dict == convert_all_lists_to_tuples_in_mapping(PROPAGATION_CONFIGURATION.copy())
|
||||
assert config_dict == PROPAGATION_CONFIGURATION
|
||||
|
||||
|
||||
def test_propagation_configuration__invalid_maximum_depth():
|
||||
|
@ -243,7 +242,7 @@ def test_agent_configuration():
|
|||
assert isinstance(config.credential_collectors[0], PluginConfiguration)
|
||||
assert isinstance(config.payloads[0], PluginConfiguration)
|
||||
assert isinstance(config.propagation, PropagationConfiguration)
|
||||
assert config_dict == convert_all_lists_to_tuples_in_mapping(AGENT_CONFIGURATION.copy())
|
||||
assert config_dict == AGENT_CONFIGURATION
|
||||
|
||||
|
||||
def test_agent_configuration__negative_keep_tunnel_open_time():
|
||||
|
|
Loading…
Reference in New Issue