diff --git a/src/python_testing/matter_testing_support.py b/src/python_testing/matter_testing_support.py index 8275b8f0f83326..b9a728e068d39e 100644 --- a/src/python_testing/matter_testing_support.py +++ b/src/python_testing/matter_testing_support.py @@ -329,7 +329,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):