Error message update 08/14108/1 k-release k-release-maintenance
authorSwaraj Kumar <swaraj.kumar@samsung.com>
Tue, 4 Feb 2025 02:58:04 +0000 (08:28 +0530)
committersubhash kumar singh <subh.singh@samsung.com>
Tue, 4 Feb 2025 10:39:53 +0000 (10:39 +0000)
Change-Id: I94c2b5677bf7de4230317defcaa63dd0e45264c3
Signed-off-by: Swaraj Kumar <swaraj.kumar@samsung.com>
tests/test_trainingjob_controller.py
trainingmgr/controller/trainingjob_controller.py

index a7aa34e..80545a3 100644 (file)
@@ -97,7 +97,7 @@ class Test_create_trainingjob:
     @patch('trainingmgr.controller.trainingjob_controller.get_modelinfo_by_modelId_service', return_value = None)
     def test_create_trainingjob_model_not_registered(self, mock1):
         trainingmgr_main.LOGGER.debug("******* test_create_trainingjob_model_not_registered *******")
-        expected_data = "modelId test_model and 1 is not registered at MME, Please first register at MME and then continue"
+        expected_data = "Model name = test_model and Model version = 1 is not registered at MME, Please first register at MME and then continue"
         trainingjob_req = {
             "modelId":{
                 "modelname": "test_model", 
@@ -129,7 +129,7 @@ class Test_create_trainingjob:
     @patch('trainingmgr.controller.trainingjob_controller.get_modelinfo_by_modelId_service', return_value=registered_model_list)
     def test_create_trainingjob_model_location_mismatch(self, mock1):
         trainingmgr_main.LOGGER.debug("******* test_create_trainingjob_model_location_mismatch *******")
-        expected_data = "modelId test_model and 1 and trainingjob created does not have same modelLocation, Please first register at MME properly and then continue"
+        expected_data = "Model name = test_model and Model version = 1 and trainingjob created does not have same modelLocation, Please first register at MME properly and then continue"
         trainingjob_req = {
             "modelId":{
                 "modelname": "test_model", 
index 5c9dfd7..1676277 100644 (file)
@@ -79,11 +79,11 @@ def create_trainingjob():
         registered_model_list = get_modelinfo_by_modelId_service(model_id.modelname, model_id.modelversion)
         # Verify if the modelId is registered over mme or not
         if registered_model_list is None:
-            return jsonify({"Exception":f"modelId {model_id.modelname} and {model_id.modelversion} is not registered at MME, Please first register at MME and then continue"}), status.HTTP_400_BAD_REQUEST
+            return jsonify({"Exception":f"Model name = {model_id.modelname} and Model version = {model_id.modelversion} is not registered at MME, Please first register at MME and then continue"}), status.HTTP_400_BAD_REQUEST
 
         registered_model_dict = registered_model_list[0]
         if registered_model_dict["modelLocation"] != trainingjob.model_location:
-            return jsonify({"Exception":f"modelId {model_id.modelname} and {model_id.modelversion} and trainingjob created does not have same modelLocation, Please first register at MME properly and then continue"}), status.HTTP_400_BAD_REQUEST
+            return jsonify({"Exception":f"Model name = {model_id.modelname} and Model version = {model_id.modelversion} and trainingjob created does not have same modelLocation, Please first register at MME properly and then continue"}), status.HTTP_400_BAD_REQUEST
         
         return create_training_job(trainingjob=trainingjob, registered_model_dict= registered_model_dict)