aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMichal Jagiello <michal.jagiello@t-mobile.pl>2022-02-08 13:08:29 +0000
committerGerrit Code Review <gerrit@onap.org>2022-02-08 13:08:29 +0000
commit79e2cf87c107ac0dcac46c5bf7f3a090661c8b70 (patch)
tree98083f2439f41f020625cc54cadcb8f3d5fa4d66 /tests
parent4eeead2dd7f6dec678c8e581132c7907c4d755d8 (diff)
parent0384b57fa175d45f5c3947adb488ef572669bce1 (diff)
Merge "Declare nested inputs in services"
Diffstat (limited to 'tests')
-rw-r--r--tests/test_service_instance_resource.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/test_service_instance_resource.py b/tests/test_service_instance_resource.py
index 04a18d6..91e8860 100644
--- a/tests/test_service_instance_resource.py
+++ b/tests/test_service_instance_resource.py
@@ -128,20 +128,20 @@ def test_si_resource_create(
mock_service_instantionation.instantiate_macro.assert_called_once()
-def test_so_service():
+@patch("onap_data_provider.resources.service_instance_resource.ServiceInstanceResource.service_subscription", new_callable=PropertyMock)
+def test_so_service(mock_service_subscription):
si_resource = ServiceInstanceResource(INSTANTIATION_PARAMETERS_DATA)
so_service = si_resource.so_service
- assert so_service.subscription_service_type == "service1"
assert len(so_service.vnfs) == 1
vnf = so_service.vnfs[0]
- assert vnf["model_name"] == "test"
- assert vnf["vnf_name"] == "test"
- assert len(vnf["parameters"]) == 2
- assert len(vnf["vf_modules"]) == 1
- vf_module = vnf["vf_modules"][0]
- assert vf_module["model_name"] == "base_ubuntu20"
- assert vf_module["vf_module_name"] == "base_ubuntu20"
- assert len(vf_module["parameters"]) == 10
+ assert vnf.model_name == "test"
+ assert vnf.instance_name == "test"
+ assert len(vnf.parameters) == 2
+ assert len(vnf.vf_modules) == 1
+ vf_module = vnf.vf_modules[0]
+ assert vf_module.model_name == "base_ubuntu20"
+ assert vf_module.instance_name == "base_ubuntu20"
+ assert len(vf_module.parameters) == 10
@patch("onap_data_provider.resources.service_instance_resource.AaiService.get_all")