diff --git a/src/python_testing/matter_testing_support.py b/src/python_testing/matter_testing_support.py index f5b20ce779c6ca..d44754f379d92e 100644 --- a/src/python_testing/matter_testing_support.py +++ b/src/python_testing/matter_testing_support.py @@ -330,7 +330,7 @@ def wait_for_report(self): logging.info( f"[AttributeChangeCallback] Got attribute subscription report. Attribute {path.AttributeType}. Updated value: {attribute_value}. SubscriptionId: {transaction.subscriptionId}") except KeyError: - asserts.fail("[AttributeChangeCallback] Attribute {expected_attribute} not found in returned report") + asserts.fail(f"[AttributeChangeCallback] Attribute {self._expected_attribute} not found in returned report") def await_sequence_of_reports(report_queue: queue.Queue, endpoint_id: int, attribute: TypedAttributePath, sequence: list[Any], timeout_sec: float):