diff --git a/xos/synchronizer/event_steps/__init__.py b/xos/synchronizer/event_steps/__init__.py
new file mode 100644
index 0000000..19d1424
--- /dev/null
+++ b/xos/synchronizer/event_steps/__init__.py
@@ -0,0 +1,13 @@
+# Copyright 2019-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
diff --git a/xos/synchronizer/event_steps/kubernetes_event.py b/xos/synchronizer/event_steps/kubernetes_event.py
index 67c2569..d319eb0 100644
--- a/xos/synchronizer/event_steps/kubernetes_event.py
+++ b/xos/synchronizer/event_steps/kubernetes_event.py
@@ -15,8 +15,6 @@
 
 
 import json
-import os
-import sys
 from xossynchronizer.event_steps.eventstep import EventStep
 from xossynchronizer.modelaccessor import ONOSApp, ONOSService
 from xosconfig import Config
@@ -24,6 +22,7 @@
 
 log = create_logger(Config().get('logging'))
 
+
 class KubernetesPodDetailsEventStep(EventStep):
     topics = ["xos.kubernetes.pod-details"]
     technology = "kafka"
@@ -52,18 +51,23 @@
                 continue
 
             log.info("Dirtying ONOS Service", service=service)
-            service.backend_code=0
-            service.backend_status="resynchronize due to kubernetes event"
+            service.backend_code = 0
+            service.backend_status = "resynchronize due to kubernetes event"
             service.save(update_fields=["updated", "backend_code", "backend_status"], always_update_timestamp=True)
 
             for app in service.service_instances.all():
                 log.info("Dirtying ONOS App", app=app)
-                app.backend_code=0
-                app.backend_status="resynchronize due to kubernetes event"
+                app.backend_code = 0
+                app.backend_status = "resynchronize due to kubernetes event"
                 app.save(update_fields=["updated", "backend_code", "backend_status"], always_update_timestamp=True)
 
                 for attr in app.service_instance_attributes.all():
                     log.info("Dirtying ServiceInstanceAttributes for App", app=app, attr=attr)
                     attr.backend_code = 0
                     attr.backend_status = "resynchronize due to kubernetes event"
-                    attr.save(update_fields=["updated", "backend_code", "backend_status"], always_update_timestamp=True)
+                    attr.save(
+                        update_fields=[
+                            "updated",
+                            "backend_code",
+                            "backend_status"],
+                        always_update_timestamp=True)
diff --git a/xos/synchronizer/event_steps/test_kubernetes_event.py b/xos/synchronizer/event_steps/test_kubernetes_event.py
index 3d81f78..70d20df 100644
--- a/xos/synchronizer/event_steps/test_kubernetes_event.py
+++ b/xos/synchronizer/event_steps/test_kubernetes_event.py
@@ -14,13 +14,12 @@
 
 import unittest
 import json
-import functools
-from mock import patch, call, Mock, PropertyMock
-import requests_mock
+from mock import patch, call, Mock
 
-import os, sys
+import os
+import sys
 
-test_path=os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
+test_path = os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
 
 
 class TestKubernetesEvent(unittest.TestCase):
@@ -38,15 +37,13 @@
         # END Setting up the config module
 
         from xossynchronizer.mock_modelaccessor_build import mock_modelaccessor_config
-        mock_modelaccessor_config(test_path, [("onos-service", "onos.xproto"),])
+        mock_modelaccessor_config(test_path, [("onos-service", "onos.xproto"), ])
 
         import xossynchronizer.modelaccessor
         import mock_modelaccessor
-        reload(mock_modelaccessor) # in case nose2 loaded it in a previous test
+        reload(mock_modelaccessor)  # in case nose2 loaded it in a previous test
         reload(xossynchronizer.modelaccessor)      # in case nose2 loaded it in a previous test
 
-        from kubernetes_event import KubernetesPodDetailsEventStep
-
         from xossynchronizer.modelaccessor import model_accessor
 
         self.model_accessor = model_accessor
@@ -62,10 +59,10 @@
         self.event_step = KubernetesPodDetailsEventStep
 
         self.onos = ONOSService(name="myonos",
-                                rest_hostname = "onos-url",
-                                rest_port = "8181",
-                                rest_username = "karaf",
-                                rest_password = "karaf",
+                                rest_hostname="onos-url",
+                                rest_port="8181",
+                                rest_username="karaf",
+                                rest_password="karaf",
                                 backend_code=1,
                                 backend_status="succeeded")
 
@@ -78,16 +75,16 @@
         self.mockAllAttr.all.return_value = [self.attr]
 
         self.app1 = ONOSApp(name="myapp1",
-                           owner=self.onos,
-                           backend_code=1,
-                           backend_status="succeeded",
-                           service_instance_attributes=self.mockAllAttr)
+                            owner=self.onos,
+                            backend_code=1,
+                            backend_status="succeeded",
+                            service_instance_attributes=self.mockAllAttr)
 
         self.app2 = ONOSApp(name="myapp2",
-                           owner=self.onos,
-                           backend_code=1,
-                           backend_status="succeeded",
-                           service_instance_attributes=self.mockAllAttr)
+                            owner=self.onos,
+                            backend_code=1,
+                            backend_status="succeeded",
+                            service_instance_attributes=self.mockAllAttr)
 
         self.onos.service_instances = MockObjectList([self.app1, self.app2])
 
@@ -99,9 +96,9 @@
 
     def test_process_event(self):
         with patch.object(ONOSService.objects, "get_items") as service_objects, \
-             patch.object(ONOSService, "save", autospec=True) as service_save, \
-             patch.object(ONOSApp, "save", autospec=True) as app_save, \
-             patch.object(ServiceInstanceAttribute, "save", autospec=True) as attr_save:
+                patch.object(ONOSService, "save", autospec=True) as service_save, \
+                patch.object(ONOSApp, "save", autospec=True) as app_save, \
+                patch.object(ServiceInstanceAttribute, "save", autospec=True) as attr_save:
             service_objects.return_value = [self.onos]
 
             event_dict = {"status": "created",
@@ -114,8 +111,13 @@
 
             self.assertEqual(self.onos.backend_code, 0)
             self.assertEqual(self.onos.backend_status, "resynchronize due to kubernetes event")
-            service_save.assert_called_with(self=self.onos, update_fields=["updated", "backend_code", "backend_status"],
-                                            always_update_timestamp=True)
+            service_save.assert_called_with(
+                self=self.onos,
+                update_fields=[
+                    "updated",
+                    "backend_code",
+                    "backend_status"],
+                always_update_timestamp=True)
 
             self.assertEqual(self.app1.backend_code, 0)
             self.assertEqual(self.app1.backend_status, "resynchronize due to kubernetes event")
@@ -206,9 +208,5 @@
             self.assertEqual(self.app2.backend_status, "succeeded")
 
 
-
 if __name__ == '__main__':
     unittest.main()
-
-
-
