From 7dc65a533a943a22534a3b4d9a85050caf06d08b Mon Sep 17 00:00:00 2001 From: jitendracandela Date: Mon, 5 Jun 2023 15:21:40 +0530 Subject: [PATCH] Modified Fail message logic for wifi capacity Signed-off-by: jitendracandela --- lf_libs/lf_tests.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lf_libs/lf_tests.py b/lf_libs/lf_tests.py index 016d5975..2e7c6b5b 100644 --- a/lf_libs/lf_tests.py +++ b/lf_libs/lf_tests.py @@ -1209,8 +1209,10 @@ class lf_tests(lf_libs): self.attach_report_kpi(report_name=report_name) numeric_score = self.read_kpi_file(column_name=["numeric-score"], dir_name=report_name) logging.info("Numeric-score: " + str(numeric_score)) + max_num_stations = int(sum(num_stations.values())) + logging.info("Max num stations: " + str(max_num_stations)) if len(numeric_score) < 5: - if int(numeric_score[0][0]) == 0 and int(numeric_score[1][0]) == 0 and int(numeric_score[-1][0]) > 0 and int(numeric_score[-2][0]) > 0: + if int(numeric_score[0][0]) < max_num_stations and int(numeric_score[1][0]) < max_num_stations and int(numeric_score[-1][0]) > 0 and int(numeric_score[-2][0]) > 0: pytest.fail("Station did not get an ip") wificapacity_obj_list.append(wificapacity_obj)