From 4403dded90a6b2fb82cc937fe766dad8c7e7470b Mon Sep 17 00:00:00 2001 From: Romulo Quidute Filho Date: Tue, 26 Nov 2024 17:56:59 +0000 Subject: [PATCH] Fixed flake --- app/pics_applicable_test_cases.py | 1 - app/schemas/pics.py | 14 ++++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app/pics_applicable_test_cases.py b/app/pics_applicable_test_cases.py index 7895a0d6..b4c4bce4 100644 --- a/app/pics_applicable_test_cases.py +++ b/app/pics_applicable_test_cases.py @@ -46,7 +46,6 @@ def applicable_test_cases_list(pics: PICS) -> PICSApplicableTestCases: disabled_pics = set([item.number for item in pics.all_disabled_items()]) all_pics_definitions.update(disabled_pics) - applicable_mandatories_tests = __applicable_test_cases( test_collections, all_pics_definitions, True ) diff --git a/app/schemas/pics.py b/app/schemas/pics.py index f1f3170d..2027d345 100644 --- a/app/schemas/pics.py +++ b/app/schemas/pics.py @@ -29,13 +29,15 @@ def enabled_items(self) -> list[PICSItem]: return list([item for item in self.items.values() if item.enabled]) def disabled_items(self) -> list[PICSItem]: - # Disabled PICS must be represented as "![PICS_DEFINITION]" + # Disabled PICS must be represented as "![PICS_DEFINITION]" # Example: !MCORE.DD.NON_CONCURRENT_CONNECTION - return [ - item - for item in self.items.values() - if not item.enabled and setattr(item, "number", f"!{item.number}") is None - ] + disabled_items: list[PICSItem] = [] + for item in self.items.values(): + if not item.enabled: + item.number = f"!{item.number}" + disabled_items.append(item) + + return disabled_items class PICS(BaseModel):