VOL-276: Fix for Failing OMCI & OFAGENT utests
Addressed review comments
Change-Id: I4d08c842e0a4dadba7aa09420490f1c29310fa31
diff --git a/tests/utests/ofagent/__init__.py b/tests/utests/ofagent/__init__.py
new file mode 100644
index 0000000..4edfd72
--- /dev/null
+++ b/tests/utests/ofagent/__init__.py
@@ -0,0 +1,4 @@
+import os
+import sys
+voltha_base = os.getenv("VOLTHA_BASE",".")
+sys.path.append(voltha_base+'/ofagent/')
diff --git a/tests/utests/ofagent/test_connection_mgr.py b/tests/utests/ofagent/test_connection_mgr.py
index 657a37a..179e691 100644
--- a/tests/utests/ofagent/test_connection_mgr.py
+++ b/tests/utests/ofagent/test_connection_mgr.py
@@ -28,7 +28,7 @@
         consul_endpoint,voltha_endpoint,controller_endpoints  = self.gen_endpoints()
         test_connection_init = ConnectionManager(consul_endpoint, voltha_endpoint, controller_endpoints)
         self.assertEqual(test_connection_init.consul_endpoint,consul_endpoint)
-        self.assertEqual(test_connection_init.voltha_endpoint, voltha_endpoint)
+        self.assertEqual(test_connection_init.vcore_endpoint, voltha_endpoint)
         self.assertEqual(test_connection_init.controller_endpoints, controller_endpoints)
 
     def test_resolve_endpoint(self):
@@ -58,7 +58,7 @@
         with self.assertRaises(Exception) as context:
             test_connection_init.delete_agent(device.datapath_id)
         print context.exception
-        self.assertTrue('\'NoneType\' object has no attribute \'disconnect\'' in context.exception)
+        self.assertTrue('\'NoneType\' object has no attribute \'disconnect\'' in str(context.exception))
 
     def test_forward_packet_in(self):
         consul_endpoint, voltha_endpoint, controller_endpoints = self.gen_endpoints()
@@ -69,4 +69,4 @@
         test_connection_init.forward_packet_in(device.id, packet_in)
 
 if __name__ == '__main__':
-    main()
\ No newline at end of file
+    main()
diff --git a/tests/utests/ofagent/test_of_protocol_handler.py b/tests/utests/ofagent/test_of_protocol_handler.py
index d72b0b2..a2eb74e 100644
--- a/tests/utests/ofagent/test_of_protocol_handler.py
+++ b/tests/utests/ofagent/test_of_protocol_handler.py
@@ -35,7 +35,7 @@
         with self.assertRaises(Exception) as context:
             of_proto_handler.handle_flow_mod_request(generic_obj)
         print context.exception
-        self.assertTrue('\'function\' object has no attribute \'send\'' in context.exception)
+        self.assertTrue('\'function\' object has no attribute \'send\'' in str(context.exception))
 
     def test_handle_flow_mod_request_role_master(self):
         generic_obj = self.gen_generic_obj()
@@ -53,7 +53,7 @@
             of_proto_handler.handle_role_request(req)
             self.assertEqual(of_proto_handler.role,req.role)
         print context.exception
-        self.assertTrue('\'function\' object has no attribute \'send\'' in context.exception)
+        self.assertTrue('\'function\' object has no attribute \'generation_is_defined\'' in str(context.exception))
 
     def test_forward_packet_in_role_none(self):
         packet_in = self.gen_packet_in()
@@ -71,7 +71,7 @@
         with self.assertRaises(Exception) as context:
             of_proto_handler.forward_packet_in(packet_in)
         print context.exception
-        self.assertTrue('\'function\' object has no attribute \'send\'' in context.exception)
+        self.assertTrue('\'function\' object has no attribute \'send\'' in str(context.exception))
 
 if __name__ == '__main__':
-    main()
\ No newline at end of file
+    main()
diff --git a/tests/utests/voltha/extensions/omci/test_omci.py b/tests/utests/voltha/extensions/omci/test_omci.py
index 4ec0aeb..9660b20 100644
--- a/tests/utests/voltha/extensions/omci/test_omci.py
+++ b/tests/utests/voltha/extensions/omci/test_omci.py
@@ -1060,8 +1060,6 @@
             "000000000000000000000028a6bc6e48",
             "01042e0a00020000014904011800ffffffff0000000000000000000000000000"
             "000000000000000000000028f747c739",
-            "01052e0a00020000014c00000000000000000000000000000000000000000000"
-            "000000000000000000000028523bd7e4",
             "01062e0a00020000015b0002c00000001018aaaa000000000000000000000000"
             "0000000000000000000000288abbdf19",
             "01072e0a00020000015b00022000000000000000000000000000000000000000"