fc563299a11bbb49b3dd703f61def42e5bc3d2f9
1 #######################################################################################
2 # Copyright ETSI Contributors and Others.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #######################################################################################
20 from osm_ng_ro
.ns
import Ns
23 __author__
= "Eduardo Sousa"
24 __date__
= "$19-NOV-2021 00:00:00$"
27 class TestNs(unittest
.TestCase
):
31 def test__create_task(self
):
33 "target_id": "vim_openstack_1",
34 "action_id": "123456",
36 "task_id": "123456:1",
37 "status": "SCHEDULED",
40 "target_record": "test_target_record",
41 "target_record_id": "test_target_record_id",
42 # values coming from extra_dict
43 "params": "test_params",
44 "find_params": "test_find_params",
45 "depends_on": "test_depends_on",
48 "action_id": "123456",
53 task
= Ns
._create
_task
(
54 deployment_info
=deployment_info
,
55 target_id
="vim_openstack_1",
58 target_record
="test_target_record",
59 target_record_id
="test_target_record_id",
61 "params": "test_params",
62 "find_params": "test_find_params",
63 "depends_on": "test_depends_on",
67 self
.assertEqual(deployment_info
.get("task_index"), 2)
68 self
.assertDictEqual(task
, expected_result
)