mirror of
https://github.com/Telecominfraproject/oopt-gnpy.git
synced 2025-10-29 17:22:42 +00:00
refactor build_network: create a separate function to add elements
separate function that adds element, from function that configure them Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com> Change-Id: Ica332223bdf7fc599cb007d7513d7cd62d9c5f9c
This commit is contained in:
@@ -24,7 +24,7 @@ from xlrd import open_workbook
|
||||
import pytest
|
||||
from copy import deepcopy
|
||||
from gnpy.core.utils import automatic_nch, lin2db
|
||||
from gnpy.core.network import build_network
|
||||
from gnpy.core.network import build_network, add_missing_elements_in_network
|
||||
from gnpy.core.exceptions import ServiceError
|
||||
from gnpy.topology.request import (jsontocsv, requests_aggregation, compute_path_dsjctn, deduplicate_disjunctions,
|
||||
compute_path_with_disjunction, ResultElement, PathRequest)
|
||||
@@ -71,6 +71,7 @@ def test_auto_design_generation_fromxlsgainmode(tmpdir, xls_input, expected_json
|
||||
"""tests generation of topology json and that the build network gives correct results in gain mode"""
|
||||
equipment = load_equipment(eqpt_filename)
|
||||
network = load_network(xls_input, equipment)
|
||||
add_missing_elements_in_network(network, equipment)
|
||||
# in order to test the Eqpt sheet and load gain target,
|
||||
# change the power-mode to False (to be in gain mode)
|
||||
equipment['Span']['default'].power_mode = False
|
||||
|
||||
Reference in New Issue
Block a user