diff --git a/test/csit/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py b/test/csit/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py
index e12816a..7ecfb8b 100644
--- a/test/csit/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py
+++ b/test/csit/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py
@@ -8,7 +8,8 @@
     def __init__(self):
         pass
 
-    def check_for_log(self, search_for):
+    @staticmethod
+    def check_for_log(search_for):
         client = docker.from_env()
         container = client.containers.get('prh')
         for line in container.logs(stream=True):
@@ -17,20 +18,23 @@
         else:
             return False
 
-    def create_pnf_ready_notification(self, json_file):
-        jsonToPython = json.loads(json_file)
-        ipv4 = jsonToPython["event"]["otherFields"]["pnfOamIpv4Address"]
-        ipv6 = jsonToPython["event"]["otherFields"]["pnfOamIpv6Address"]
-        pnfName = _create_pnf_name(json_file)
-        strJson = '{"pnf-name":"' + pnfName + '","ipaddress-v4-oam":"' + ipv4 + '","ipaddress-v6-oam":"' + ipv6 +'"}'
-        pythonToJson = json.dumps(strJson)
-        return pythonToJson.replace("\\", "")[1:-1]
+    @staticmethod
+    def create_pnf_ready_notification(json_file):
+        json_to_python = json.loads(json_file)
+        ipv4 = json_to_python["event"]["otherFields"]["pnfOamIpv4Address"]
+        ipv6 = json_to_python["event"]["otherFields"]["pnfOamIpv6Address"]
+        pnf_name = _create_pnf_name(json_file)
+        str_json = '{"pnf-name":"' + pnf_name + '","ipaddress-v4-oam":"' + ipv4 + '","ipaddress-v6-oam":"' + ipv6 + '"}'
+        python_to_json = json.dumps(str_json)
+        return python_to_json.replace("\\", "")[1:-1]
 
-    def create_pnf_name(self, json_file):
+    @staticmethod
+    def create_pnf_name(json_file):
         return _create_pnf_name(json_file)
 
+
 def _create_pnf_name(json_file):
-    jsonToPython = json.loads(json_file)
-    vendor = jsonToPython["event"]["otherFields"]["pnfVendorName"]
-    serialNumber = jsonToPython["event"]["otherFields"]["pnfSerialNumber"]
-    return vendor[:3].upper() + serialNumber
+    json_to_python = json.loads(json_file)
+    vendor = json_to_python["event"]["otherFields"]["pnfVendorName"]
+    serial_number = json_to_python["event"]["otherFields"]["pnfSerialNumber"]
+    return vendor[:3].upper() + serial_number
diff --git a/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py b/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py
index a0dd814..d5deaca 100644
--- a/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py
+++ b/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py
@@ -2,10 +2,9 @@
 import re
 import sys
 
-from robot.api import logger
-
 pnfs = 'Empty'
 
+
 class AAIHandler(BaseHTTPServer.BaseHTTPRequestHandler):
     def do_PUT(self):
         if re.search('/set_pnfs', self.path):
@@ -38,7 +37,8 @@
         
         return
 
-def _main_ (HandlerClass = AAIHandler, ServerClass = BaseHTTPServer.HTTPServer, protocol="HTTP/1.0"):
+
+def _main_(handler_class=AAIHandler, server_class=BaseHTTPServer.HTTPServer, protocol="HTTP/1.0"):
 
     if sys.argv[1:]:
         port = int(sys.argv[1])
@@ -47,12 +47,13 @@
 
     server_address = ('', port)
 
-    HandlerClass.protocol_version = protocol
-    httpd = ServerClass(server_address, HandlerClass)
+    handler_class.protocol_version = protocol
+    httpd = server_class(server_address, handler_class)
 
     sa = httpd.socket.getsockname()
     print "Serving HTTP on", sa[0], "port", sa[1], "..."
     httpd.serve_forever()
 
+
 if __name__ == '__main__':
     _main_()
diff --git a/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py b/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py
index 1678678..b538282 100644
--- a/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py
+++ b/test/csit/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py
@@ -2,16 +2,14 @@
 import re
 import sys
 
-from robot.api import logger
-
 posted_event_from_prh = 'Empty'
 received_event_to_get_method = 'Empty'
 
+
 class DMaaPHandler(BaseHTTPServer.BaseHTTPRequestHandler):
     def do_PUT(self):
         if re.search('/set_get_event', self.path):
             global received_event_to_get_method
-            posted_event_from_prh = 'Empty'
             content_length = int(self.headers['Content-Length'])
             received_event_to_get_method = self.rfile.read(content_length)
             self.send_response(200)
@@ -53,7 +51,8 @@
             
         return
 
-def _main_ (HandlerClass = DMaaPHandler, ServerClass = BaseHTTPServer.HTTPServer, protocol="HTTP/1.0"):
+
+def _main_(handler_class=DMaaPHandler, server_class=BaseHTTPServer.HTTPServer, protocol="HTTP/1.0"):
 
     if sys.argv[1:]:
         port = int(sys.argv[1])
@@ -62,12 +61,13 @@
 
     server_address = ('', port)
 
-    HandlerClass.protocol_version = protocol
-    httpd = ServerClass(server_address, HandlerClass)
+    handler_class.protocol_version = protocol
+    httpd = server_class(server_address, handler_class)
 
     sa = httpd.socket.getsockname()
     print "Serving HTTP on", sa[0], "port", sa[1], "..."
     httpd.serve_forever()
 
+
 if __name__ == '__main__':
     _main_()
