diff options
author | Michal Jagiello <michal.jagiello@t-mobile.pl> | 2022-02-04 14:00:57 +0000 |
---|---|---|
committer | Michal Jagiello <michal.jagiello@t-mobile.pl> | 2022-02-08 08:46:36 +0000 |
commit | 0384b57fa175d45f5c3947adb488ef572669bce1 (patch) | |
tree | 9c4d4ecf9693475a4e7b053338760cddc31606e3 /tests/test_service_instance_resource.py | |
parent | e9dbe96626c23204bac7426bba69b4e2aedfbd8f (diff) |
Declare nested inputs in services
Distinguish service and xNFs inputs in schema
Add 'coverage' env in tox
Issue-ID: INT-2060
Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl>
Change-Id: I15c4ac2b2ddb28c938044b7e0a130a1644146f8b
Diffstat (limited to 'tests/test_service_instance_resource.py')
-rw-r--r-- | tests/test_service_instance_resource.py | 20 |
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") |