VOL-1448: Added unit test and unit-test-with-coverage support
Change-Id: Ia3c1c3b18b0871b9a796f6eb62e9f2bb14b33ab8
diff --git a/test/unit/extensions/omci/mock/mock_adapter_agent.py b/test/unit/extensions/omci/mock/mock_adapter_agent.py
index 866eb67..ebe94e2 100644
--- a/test/unit/extensions/omci/mock/mock_adapter_agent.py
+++ b/test/unit/extensions/omci/mock/mock_adapter_agent.py
@@ -20,6 +20,7 @@
# from pyvoltha.protos.voltha_pb2 import VolthaInstance
# from pyvoltha.adapters.extensions.omci.omci_frame import OmciFrame
+
class MockProxyAddress(object):
def __init__(self, device_id, pon_id, onu_id):
self.device_id = device_id # Device ID of proxy (OLT)
@@ -44,6 +45,10 @@
class MockCore(object):
def __init__(self):
self.root = None # ConfigRoot(VolthaInstance())
+ if self.root is None:
+ from nose import SkipTest
+ msg = "TODO: Unit tests involving the kv-store are not yet supported by pyvoltha"
+ raise SkipTest(msg)
def get_proxy(self, path):
return self.root.get_proxy(path)
diff --git a/test/unit/extensions/omci/test_image_agent.py b/test/unit/extensions/omci/test_image_agent.py
index a801d0a..08f0f1e 100644
--- a/test/unit/extensions/omci/test_image_agent.py
+++ b/test/unit/extensions/omci/test_image_agent.py
@@ -29,7 +29,7 @@
from pyvoltha.protos.voltha_pb2 import ImageDownload
from pyvoltha.protos.device_pb2 import Device
-from tests.utests.voltha.extensions.omci.mock.mock_adapter_agent import MockAdapterAgent, MockCore
+from test.unit.extensions.omci.mock.mock_adapter_agent import MockAdapterAgent, MockCore
from twisted.internet import reactor
from twisted.internet.defer import Deferred
from twisted.internet.epollreactor import EPollReactor
diff --git a/test/unit/extensions/omci/test_omci_cc.py b/test/unit/extensions/omci/test_omci_cc.py
index 7c1491d..ced24b0 100644
--- a/test/unit/extensions/omci/test_omci_cc.py
+++ b/test/unit/extensions/omci/test_omci_cc.py
@@ -14,7 +14,7 @@
# limitations under the License.
#
import binascii
-from common.frameio.frameio import hexify
+from pyvoltha.adapters.common.frameio.frameio import hexify
from twisted.python.failure import Failure
from unittest import TestCase, main, skip
from mock.mock_adapter_agent import MockAdapterAgent