[CLAMP] Fix Policy exception in basic_clamp 86/121286/1
authormrichomme <morgan.richomme@orange.com>
Wed, 12 May 2021 14:26:21 +0000 (16:26 +0200)
committermrichomme <morgan.richomme@orange.com>
Wed, 12 May 2021 14:26:21 +0000 (16:26 +0200)
Attribute error due to bad import

Issue-ID: TEST-338

Signed-off-by: mrichomme <morgan.richomme@orange.com>
Change-Id: Ief0341343a21f9b97dce3ca69bada97efea36727

src/onaptests/steps/loop/instantiate_loop.py

index 01eada5..07586ac 100644 (file)
@@ -6,7 +6,7 @@ import logging.config
 
 from onapsdk.clamp.loop_instance import LoopInstance
 from onapsdk.configuration import settings
-from onaptests.utils.exceptions import OnapTestException
+import onaptests.utils.exceptions as onap_test_exceptions
 
 
 class InstantiateLoop():
@@ -58,14 +58,14 @@ class InstantiateLoop():
 
         else:
             self._logger.error("An error occured while submitting the loop instance")
-            raise OnapTestException.PolicyException
+            raise onap_test_exceptions.PolicyException
         self._logger.info("******** DEPLOY LOOP INSTANCE *******")
         deploy = loop.deploy_microservice_to_dcae()
         if deploy:
             self._logger.info("Loop instance %s successfully deployed on DCAE !!", self.loop_name)
         else:
             self._logger.error("An error occured while deploying the loop instance")
-            raise OnapTestException.DcaeException
+            raise onap_test_exceptions.DcaeException
 
     def instantiate_loop(self):
         """Instantiate the control loop."""