change M value from 0 to None in case of blocking

Change tests based on M==0 value for response creation and use
instead the blocking_reason attribute existence
result element should have non null M value if request is not blocked.

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I67e4222cf9d014201e91d3aefd3624b001264e03
This commit is contained in:
EstherLerouzic
2020-11-10 16:45:22 +01:00
committed by Jan Kundrát
parent 4e38ba98ab
commit 75e7fca8e4
3 changed files with 22 additions and 19 deletions

View File

@@ -275,11 +275,12 @@ def test_json_response_generation(xls_input, expected_response_file):
result = []
for i, pth in enumerate(propagatedpths):
# test ServiceError handling : when M is zero at this point, the
# test ServiceError handling : when M is None at this point, the
# json result should not be created if there is no blocking reason
if i == 1:
my_rq = deepcopy(rqs[i])
my_rq.M = 0
my_rq.M = None
my_rq.N = None
with pytest.raises(ServiceError):
ResultElement(my_rq, pth, reversed_propagatedpths[i]).json