Fixing olt unit tests
Change-Id: I41c7d9e8a9f7c4dbc95dea1a4419f1cee9cd4a1e
diff --git a/xos/synchronizer/event_steps/test_kubernetes_event.py b/xos/synchronizer/event_steps/test_kubernetes_event.py
index bec5098..3bbc4ec 100644
--- a/xos/synchronizer/event_steps/test_kubernetes_event.py
+++ b/xos/synchronizer/event_steps/test_kubernetes_event.py
@@ -36,9 +36,8 @@
from xossynchronizer.mock_modelaccessor_build import mock_modelaccessor_config
mock_modelaccessor_config(test_path, [("olt-service", "volt.xproto"),
- ("vsg", "vsg.xproto"),
("rcord", "rcord.xproto"),
- ("onos-service", "onos.xproto"),])
+ ("onos-service", "onos.xproto")])
import xossynchronizer.modelaccessor
import mock_modelaccessor
diff --git a/xos/synchronizer/model_policies/test_model_policy_voltserviceinstance.py b/xos/synchronizer/model_policies/test_model_policy_voltserviceinstance.py
index 1cfdf05..06101d6 100644
--- a/xos/synchronizer/model_policies/test_model_policy_voltserviceinstance.py
+++ b/xos/synchronizer/model_policies/test_model_policy_voltserviceinstance.py
@@ -34,8 +34,7 @@
from xossynchronizer.mock_modelaccessor_build import mock_modelaccessor_config
mock_modelaccessor_config(test_path, [("olt-service", "volt.xproto"),
- ("vsg", "vsg.xproto"),
- ("rcord", "rcord.xproto"),])
+ ("rcord", "rcord.xproto")])
import xossynchronizer.modelaccessor
import mock_modelaccessor
@@ -52,7 +51,7 @@
for (k, v) in model_accessor.all_model_classes.items():
globals()[k] = v
- # Some of the functions we call have side-effects. For example, creating a VSGServiceInstance may lead to creation of
+ # Some of the functions we call have side-effects. For example, creating a ServiceInstance may lead to creation of
# tags. Ideally, this wouldn't happen, but it does. So make sure we reset the world.
model_accessor.reset_all_object_stores()
@@ -72,12 +71,12 @@
def test_create_vsg(self):
with patch.object(ServiceInstanceLink, "save", autospec=True) as save_link, \
- patch.object(VSGServiceInstance, "save", autospec=True) as save_vsg:
+ patch.object(ServiceInstance, "save", autospec=True) as save_vsg:
subscriber_si = Mock()
link = Mock()
- link.provider_service.get_service_instance_class_name.return_value = "VSGServiceInstance"
+ link.provider_service.get_service_instance_class_name.return_value = "ServiceInstance"
link.provider_service.name = "FabricCrossconnect"
link.provider_service.validate_links = Mock(return_value=[])
link.provider_service.acquire_service_instance = Mock(return_value=subscriber_si)
@@ -94,12 +93,12 @@
def test_create_vsg_already_exists(self):
with patch.object(ServiceInstanceLink, "save", autospec=True) as save_link, \
- patch.object(VSGServiceInstance, "save", autospec=True) as save_vsg:
+ patch.object(ServiceInstance, "save", autospec=True) as save_vsg:
subscriber_si = Mock()
link = Mock()
- link.provider_service.get_service_instance_class_name.return_value = "VSGServiceInstance"
+ link.provider_service.get_service_instance_class_name.return_value = "ServiceInstance"
link.provider_service.name = "FabricCrossconnect"
link.provider_service.validate_links = Mock(return_value=subscriber_si)
link.provider_service.acquire_service_instance = Mock()
diff --git a/xos/synchronizer/pull_steps/test_pull_olts.py b/xos/synchronizer/pull_steps/test_pull_olts.py
index 1224646..5894f5e 100644
--- a/xos/synchronizer/pull_steps/test_pull_olts.py
+++ b/xos/synchronizer/pull_steps/test_pull_olts.py
@@ -36,8 +36,7 @@
from xossynchronizer.mock_modelaccessor_build import mock_modelaccessor_config
mock_modelaccessor_config(test_path, [("olt-service", "volt.xproto"),
- ("vsg", "vsg.xproto"),
- ("rcord", "rcord.xproto"),])
+ ("rcord", "rcord.xproto")])
import xossynchronizer.modelaccessor
reload(xossynchronizer.modelaccessor) # in case nose2 loaded it in a previous test
diff --git a/xos/synchronizer/pull_steps/test_pull_onus.py b/xos/synchronizer/pull_steps/test_pull_onus.py
index 611e084..51bb5a5 100644
--- a/xos/synchronizer/pull_steps/test_pull_onus.py
+++ b/xos/synchronizer/pull_steps/test_pull_onus.py
@@ -37,8 +37,7 @@
from xossynchronizer.mock_modelaccessor_build import mock_modelaccessor_config
mock_modelaccessor_config(test_path, [("olt-service", "volt.xproto"),
- ("vsg", "vsg.xproto"),
- ("rcord", "rcord.xproto"),])
+ ("rcord", "rcord.xproto")])
import xossynchronizer.modelaccessor
reload(xossynchronizer.modelaccessor) # in case nose2 loaded it in a previous test
diff --git a/xos/synchronizer/steps/test_sync_olt_device.py b/xos/synchronizer/steps/test_sync_olt_device.py
index 044d371..1ecb04f 100644
--- a/xos/synchronizer/steps/test_sync_olt_device.py
+++ b/xos/synchronizer/steps/test_sync_olt_device.py
@@ -42,8 +42,7 @@
from xossynchronizer.mock_modelaccessor_build import mock_modelaccessor_config
mock_modelaccessor_config(test_path, [("olt-service", "volt.xproto"),
- ("vsg", "vsg.xproto"),
- ("rcord", "rcord.xproto"),])
+ ("rcord", "rcord.xproto")])
import xossynchronizer.modelaccessor
reload(xossynchronizer.modelaccessor) # in case nose2 loaded it in a previous test
diff --git a/xos/synchronizer/steps/test_sync_onu_device.py b/xos/synchronizer/steps/test_sync_onu_device.py
index 89b7b30..612b44f 100644
--- a/xos/synchronizer/steps/test_sync_onu_device.py
+++ b/xos/synchronizer/steps/test_sync_onu_device.py
@@ -34,8 +34,7 @@
from xossynchronizer.mock_modelaccessor_build import mock_modelaccessor_config
mock_modelaccessor_config(test_path, [("olt-service", "volt.xproto"),
- ("vsg", "vsg.xproto"),
- ("rcord", "rcord.xproto"),])
+ ("rcord", "rcord.xproto")])
import xossynchronizer.modelaccessor
reload(xossynchronizer.modelaccessor) # in case nose2 loaded it in a previous test
diff --git a/xos/synchronizer/steps/test_sync_volt_service_instance.py b/xos/synchronizer/steps/test_sync_volt_service_instance.py
index 7a41c1d..492b4fc 100644
--- a/xos/synchronizer/steps/test_sync_volt_service_instance.py
+++ b/xos/synchronizer/steps/test_sync_volt_service_instance.py
@@ -36,8 +36,7 @@
from xossynchronizer.mock_modelaccessor_build import mock_modelaccessor_config
mock_modelaccessor_config(test_path, [("olt-service", "volt.xproto"),
- ("vsg", "vsg.xproto"),
- ("rcord", "rcord.xproto"), ])
+ ("rcord", "rcord.xproto")])
import xossynchronizer.modelaccessor
reload(xossynchronizer.modelaccessor) # in case nose2 loaded it in a previous test