Give the UC2 config load function a meaningful name

This commit is contained in:
Marek Wolan
2024-03-04 19:43:51 +00:00
parent 1e8dfa40cf
commit a222a8c58f
11 changed files with 21 additions and 21 deletions

View File

@@ -1,4 +1,4 @@
from primaite.config.load import example_config_path
from primaite.config.load import data_manipulation_config_path
from primaite.simulator.network.container import Network
from primaite.simulator.network.hardware.node_operating_state import NodeOperatingState
from primaite.simulator.network.hardware.nodes.host.computer import Computer
@@ -7,7 +7,7 @@ from tests.integration_tests.configuration_file_parsing import BASIC_CONFIG, DMZ
def test_example_config():
"""Test that the example config can be parsed properly."""
game = load_config(example_config_path())
game = load_config(data_manipulation_config_path())
network: Network = game.simulation.network
assert len(network.nodes) == 10 # 10 nodes in example network

View File

@@ -4,7 +4,7 @@ from typing import Union
import yaml
from primaite.config.load import example_config_path
from primaite.config.load import data_manipulation_config_path
from primaite.game.agent.data_manipulation_bot import DataManipulationAgent
from primaite.game.agent.interface import ProxyAgent, RandomAgent
from primaite.game.game import APPLICATION_TYPES_MAPPING, PrimaiteGame, SERVICE_TYPES_MAPPING
@@ -37,7 +37,7 @@ def load_config(config_path: Union[str, Path]) -> PrimaiteGame:
def test_example_config():
"""Test that the example config can be parsed properly."""
game = load_config(example_config_path())
game = load_config(data_manipulation_config_path())
assert len(game.agents) == 4 # red, blue and 2 green agents