From ad0d4b52cadf46fa45db13a27307f2af6feda332 Mon Sep 17 00:00:00 2001 From: Jerry Johns Date: Thu, 25 Aug 2022 10:44:26 -0700 Subject: [PATCH] Fix default initialization of CAT values in Matter Testing Support (#22116) This fixes the default initialization of the `controller_cat_tags` field in `MatterTestingSupport` class to correctly be initialized to an empty list, since that is what is expected by FabricAdmin.NewController (and others). Testing: Repro'ed the failure described in #22114, and then confirmed this fixes it. --- src/python_testing/matter_testing_support.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python_testing/matter_testing_support.py b/src/python_testing/matter_testing_support.py index 7c21f0b6471ce8..c50270e8aa2c2f 100644 --- a/src/python_testing/matter_testing_support.py +++ b/src/python_testing/matter_testing_support.py @@ -147,7 +147,7 @@ class MatterTestConfig: # Node ID to use for controller/commissioner controller_node_id: int = _DEFAULT_CONTROLLER_NODE_ID # CAT Tags for default controller/commissioner - controller_cat_tags: List[int] = None + controller_cat_tags: List[int] = field(default_factory=list) # Fabric ID which to use fabric_id: int = None