From 9d02fbf2d9c01c669c37f8a956c9c0aa0e7938e5 Mon Sep 17 00:00:00 2001 From: john feng Date: Sun, 12 Jan 2025 21:57:54 -0800 Subject: [PATCH] remove comma the end of tombstone_name to fix json serialization --- src/core/src/service_interfaces/StatusHandler.py | 2 +- src/core/tests/Test_StatusHandlerTruncation.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/src/service_interfaces/StatusHandler.py b/src/core/src/service_interfaces/StatusHandler.py index 840211b9c..94c8286d1 100644 --- a/src/core/src/service_interfaces/StatusHandler.py +++ b/src/core/src/service_interfaces/StatusHandler.py @@ -1139,7 +1139,7 @@ def __create_assessment_tombstone(self, classification_name, patches_count_by_cl Patch Name: 20 additional updates of classification reported. Classification: [Critical, Security, Other] """ - tombstone_name = str(patches_count_by_classification) + ' additional updates of classification ' + classification_name + ' reported', + tombstone_name = str(patches_count_by_classification) + ' additional updates of classification ' + classification_name + ' reported' return { 'patchId': 'Truncated_patch_list_id', 'name': tombstone_name, diff --git a/src/core/tests/Test_StatusHandlerTruncation.py b/src/core/tests/Test_StatusHandlerTruncation.py index ba2ff8e8e..4b13eb097 100644 --- a/src/core/tests/Test_StatusHandlerTruncation.py +++ b/src/core/tests/Test_StatusHandlerTruncation.py @@ -855,7 +855,7 @@ def __assert_assessment_tombstone_record(self, truncated_substatus_file_data, to truncated_substatus_msg = self.__get_message_json_from_substatus(truncated_substatus_file_data) self.assertEqual(truncated_substatus_msg['patches'][-1]['patchId'], "Truncated_patch_list_id") self.assertEqual(truncated_substatus_msg['patches'][-1]['classifications'], ['Other']) - self.assertTrue("additional updates of classification" in truncated_substatus_msg['patches'][-1]['name'][0]) + self.assertTrue("additional updates of classification" in truncated_substatus_msg['patches'][-1]['name']) if tombstone_count >= 2: self.assertEqual(truncated_substatus_msg['patches'][-2]['patchId'], "Truncated_patch_list_id")