Merge "Fix PM_MAPPER_01 test - use a non-generic log"
[integration/csit.git] / tests / dcaegen2 / testcases / resources / DcaeLibrary.py
index d4188e3..a9d5def 100644 (file)
@@ -64,7 +64,7 @@ class DcaeLibrary(object):
         return "false"
     
     @staticmethod
-    def enable_vesc_https_auth():
+    def enable_vesc_with_certBasicAuth():
         global client
         if 'Windows' in platform.system():
             try:
@@ -85,14 +85,25 @@ class DcaeLibrary(object):
         logger.console("Running script: " + script2run)
         subprocess.call(script2run)
         time.sleep(5)
-        return  
-                   
+        return
+
+    @staticmethod
+    def dmaap_message_receive_on_topic(evtobj, topic):
+
+        evt_str = DMaaP.deque_event()
+        while evt_str != None:
+            if evtobj in evt_str and topic in evt_str:
+                logger.info("DMaaP Receive Expected Publish Event:\n" + evt_str)
+                logger.info("On Expected Topic:\n" + topic)
+                return 'true'
+            evt_str = DMaaP.deque_event()
+        return 'false'
+
     @staticmethod
     def dmaap_message_receive(evtobj, action='contain'):
         
         evt_str = DMaaP.deque_event()
         while evt_str != None:
-            logger.console("DMaaP receive VES Event:\n" + evt_str)
             if action == 'contain':
                 if evtobj in evt_str:
                     logger.info("DMaaP Receive Expected Publish Event:\n" + evt_str)