def test_model_add_lower_level_deployment_node(empty_model: Model): """Make sure child deployment nodes are not reflected in Model.deployent_nodes.""" node1 = empty_model.add_deployment_node(name="node1") node2 = DeploymentNode(name="node2", parent=node1) empty_model += node2 assert node2 not in empty_model.deployment_nodes assert node2 in empty_model.get_elements()
def test_model_can_add_elements_with_plusequals(empty_model: Model, ): """Ensure passing something other than a Person or SoftwareSystem to += works.""" sys = SoftwareSystem(name="Sys") c = Container(name="C") c.parent = sys empty_model += c assert c in empty_model.get_elements()
def test_model_add_top_level_deployment_node(empty_model: Model): """Make sure top-level deployment nodes are reflected in Model.deployent_nodes.""" node = empty_model.add_deployment_node(name="node1") assert node is not None assert node in empty_model.deployment_nodes assert node in empty_model.get_elements()