add aa bidir request to test service error handling
TODO: write more detailed test on the bidir case
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
For this purpose we create a wrong request with M=0 and verify
that serviceError is correctly raised when calling Result_element class
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
function compute_path_with_disjunction needs an additional reversed path
and results must contain wavelength assignment
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
previous comparison was done on the result from .sort(), ie None.
list.sort() method modifies the list in-place and returns None.
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
add a no path case (request 6) in requests and expected responses.
response is also generated if path is not feasible: checks
that it is correctly handled in csv and json responses
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
create a json response based on test file and compare it to expected
response.
comparison first checks that there is no missing or extra key
and then compares keys
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
previous test assumed same order for header fields.
order the headers in the same way in order to support different
types of order
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
use
if not condition:
raise AssertionError()
instead of
assert condition
according to codacy recommendation
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
using pandas package to have an easy ordering of response column:
- test that the generated header is as expected
- read the response. In order to support different orders wrt
response answer and field answer, test function frst orders lines
according to response index and then to columns (fields of the answer).
check that the answers are as expected
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
- use the same file to test different configuration: with and without Eqpt sheet defined,
add the abcdfgh topo for disjunction tests in the same file
- change the name of files to avoid mixing with examples/meshTopologyExampleV2.xxx
TODO: test if examples/ files pass for both path_requests_run and trasmission_main_example
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
- update eqpt_config.json to power-mode : false to take into account gain target
of the eqpt sheet
- correct eqpt-config.json with new parameters
- add gain target in meshTopolgyExampleV2Eqpt.xls
- correct test_parser.py test function names
- suppress Exceltestfile
- change power_mode in test_parser to True in eqpt_config.json for all tests
except for parser: changed in the function to False to enable
Eqpt files gain target reading
Next: reduce the number of test files and include examples/ files in the tests
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
- tests if networ autodesign does not change some reference files
- changed the meshTopologyExampleV2 files to account for newest features:
empty columns in mode, power, nb channels, disjuntion examples ...
- added a tsp type with more modes for diversification of tests
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>