diff --git a/test/unit/common/test_event_bus.py b/test/unit/common/test_event_bus.py
index be325e8..c833bf0 100644
--- a/test/unit/common/test_event_bus.py
+++ b/test/unit/common/test_event_bus.py
@@ -13,6 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+from __future__ import absolute_import
 import re
 
 from mock import Mock
@@ -21,6 +22,7 @@
 from twisted.trial.unittest import TestCase
 
 from pyvoltha.common.event_bus import EventBusClient, EventBus
+from six.moves import range
 
 
 class TestEventBus(TestCase):
@@ -187,11 +189,11 @@
 
         ebc.subscribe('', lambda _, msg: queue.put(msg))
 
-        for i in xrange(10):
+        for i in range(10):
             ebc.publish('', i)
 
         self.assertEqual(len(queue.pending), 10)
-        for i in xrange(10):
+        for i in range(10):
             msg = yield queue.get()
             self.assertEqual(msg, i)
         self.assertEqual(len(queue.pending), 0)
diff --git a/test/unit/common/utils/test_bpf.py b/test/unit/common/utils/test_bpf.py
index 21a80da..6cb2a00 100644
--- a/test/unit/common/utils/test_bpf.py
+++ b/test/unit/common/utils/test_bpf.py
@@ -11,6 +11,7 @@
 # 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.
+from __future__ import absolute_import
 from unittest import TestCase, main
 
 from scapy.layers.l2 import Ether, Dot1Q
@@ -25,8 +26,8 @@
         pcp = 7
         frame_match = 'ether[14:2] = 0x{:01x}{:03x}'.format(pcp << 1, vid)
         filter = BpfProgramFilter(frame_match)
-        self.assertTrue(filter(str(Ether()/Dot1Q(prio=pcp, vlan=vid))))
-        self.assertFalse(filter(str(Ether()/Dot1Q(prio=pcp, vlan=4000))))
+        self.assertTrue(filter(bytes(Ether()/Dot1Q(prio=pcp, vlan=vid))))
+        self.assertFalse(filter(bytes(Ether()/Dot1Q(prio=pcp, vlan=4000))))
 
     def test_bpf2(self):
         vid1 = 4090
@@ -39,9 +40,9 @@
 
         filter = BpfProgramFilter('{} or {}'.format(
             frame_match_case1, frame_match_case2))
-        self.assertTrue(filter(str(Ether()/Dot1Q(prio=pcp1, vlan=vid1))))
-        self.assertTrue(filter(str(Ether()/Dot1Q(vlan=vid2))))
-        self.assertFalse(filter(str(Ether()/Dot1Q(vlan=4001))))
+        self.assertTrue(filter(bytes(Ether()/Dot1Q(prio=pcp1, vlan=vid1))))
+        self.assertTrue(filter(bytes(Ether()/Dot1Q(vlan=vid2))))
+        self.assertFalse(filter(bytes(Ether()/Dot1Q(vlan=4001))))
 
 
 if __name__ == '__main__':
diff --git a/test/unit/common/utils/test_indexpool.py b/test/unit/common/utils/test_indexpool.py
index 7eb1050..eb6ea50 100644
--- a/test/unit/common/utils/test_indexpool.py
+++ b/test/unit/common/utils/test_indexpool.py
@@ -11,8 +11,10 @@
 # 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.
+from __future__ import absolute_import
 from unittest import TestCase, main
 from pyvoltha.common.utils.indexpool import IndexPool
+from six.moves import range
 
 class TestIndexPool(TestCase):
     pool = IndexPool(8, 0)
diff --git a/test/unit/common/utils/test_ordered_weakvalue_dict.py b/test/unit/common/utils/test_ordered_weakvalue_dict.py
deleted file mode 100644
index a8ce47c..0000000
--- a/test/unit/common/utils/test_ordered_weakvalue_dict.py
+++ /dev/null
@@ -1,51 +0,0 @@
-# Copyright 2017-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.
-from unittest import TestCase, main
-
-from pyvoltha.common.utils.ordered_weakvalue_dict import OrderedWeakValueDict
-
-
-class O(object):
-    def __init__(self, a):
-        self.a = a
-
-
-class TestOrderedWeakValueDict(TestCase):
-
-    def test_standard_behavior(self):
-        holder = dict()  # a real dict so we can control which object real ref
-        def mk(k):
-            o = O(k)
-            holder[k] = o
-            return o
-        o = OrderedWeakValueDict((k, mk(k)) for k in xrange(10))
-        self.assertEqual(len(o), 10)
-        self.assertEqual(o[3].a, 3)
-        o[3] = mk(-3)
-        self.assertEqual(o[3].a, -3)
-        del o[3]
-        self.assertEqual(len(o), 9)
-        o[100] = mk(100)
-        self.assertEqual(len(o), 10)
-        self.assertEqual(o.keys(), [0, 1, 2, 4, 5, 6, 7, 8, 9, 100])
-
-        # remove a few items from the holder, they should be gone from o too
-        del holder[1]
-        del holder[5]
-        del holder[6]
-
-        self.assertEqual(o.keys(), [0, 2, 4, 7, 8, 9, 100])
-        self.assertEqual([v.a for v in o.values()], [0, 2, 4, 7, 8, 9, 100])
-
-
