Add a test to go through the new added code in spectrum_assignment

Verify that there is no raised error if M=0 and the blocking attribute is there

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
This commit is contained in:
EstherLerouzic
2019-09-13 19:21:17 +01:00
parent 9eb87fc8e1
commit 42ba3eb98d

View File

@@ -318,6 +318,18 @@ def test_json_response_generation(xls_input, expected_response_file):
print(error_handled)
if not error_handled:
raise AssertionError()
error_handled = False
my_rq.blocking_reason = 'NO_SPECTRUM'
try:
temp_result = {
'response': Result_element(my_rq, pth, reversed_propagatedpths[i]).json}
print(temp_result)
except ServiceError:
error_handled = True
print(error_handled)
if error_handled:
raise AssertionError()
result.append(Result_element(rqs[i], pth, reversed_propagatedpths[i]))
temp = {