aboutsummaryrefslogtreecommitdiffstats
path: root/onap-client/onap_client/sdc/tests
diff options
context:
space:
mode:
Diffstat (limited to 'onap-client/onap_client/sdc/tests')
-rw-r--r--onap-client/onap_client/sdc/tests/test_license_model.py16
-rw-r--r--onap-client/onap_client/sdc/tests/test_service.py23
-rw-r--r--onap-client/onap_client/sdc/tests/test_vnf.py8
-rw-r--r--onap-client/onap_client/sdc/tests/test_vsp.py17
4 files changed, 31 insertions, 33 deletions
diff --git a/onap-client/onap_client/sdc/tests/test_license_model.py b/onap-client/onap_client/sdc/tests/test_license_model.py
index 8da7d07..e9ca735 100644
--- a/onap-client/onap_client/sdc/tests/test_license_model.py
+++ b/onap-client/onap_client/sdc/tests/test_license_model.py
@@ -110,14 +110,14 @@ def test_license_model_create():
)
lm = LicenseModel(
- VENDOR_NAME,
- "abc123",
- "entitlement_pool_name",
- "key_group_name",
- "feature_group_name",
- "license_agreement_name",
- "license_start_date",
- "license_end_date",
+ vendor_name=VENDOR_NAME,
+ entitlement_pool_name="entitlement_pool_name",
+ key_group_name="key_group_name",
+ feature_group_name="feature_group_name",
+ license_agreement_name="license_agreement_name",
+ license_start_date="license_start_date",
+ license_end_date="license_end_date",
)
+ lm.create()
assert lm.tosca == return_data
diff --git a/onap-client/onap_client/sdc/tests/test_service.py b/onap-client/onap_client/sdc/tests/test_service.py
index e4789a5..77eadbd 100644
--- a/onap-client/onap_client/sdc/tests/test_service.py
+++ b/onap-client/onap_client/sdc/tests/test_service.py
@@ -104,18 +104,15 @@ def test_vnf_create():
)
service = Service(
- "A-la-carte",
- SERVICE_NAME,
- "cs0008",
- "Network L1-3",
- "robot",
- "123456",
- "General_Revenue-Bearing",
- "true",
- "This is a test",
- "",
- "",
- "",
+ instantiation_type="A-la-carte",
+ service_name=SERVICE_NAME,
+ contact_id="cs0008",
+ category_name="Network L1-3",
+ tag="robot",
+ project_code="123456",
+ environment_context="General_Revenue-Bearing",
+ ecomp_generated_naming="true",
+ description="This is a test",
resources=[{
"resource_name": VNF_NAME,
"resource_id": VNF_RESOURCE_ID,
@@ -126,7 +123,7 @@ def test_vnf_create():
allow_update=False,
wait_for_distribution=False
)
-
+ service.create()
service._submit()
assert service.service_name == SERVICE_NAME
diff --git a/onap-client/onap_client/sdc/tests/test_vnf.py b/onap-client/onap_client/sdc/tests/test_vnf.py
index dfa5af1..da3dd86 100644
--- a/onap-client/onap_client/sdc/tests/test_vnf.py
+++ b/onap-client/onap_client/sdc/tests/test_vnf.py
@@ -145,12 +145,12 @@ def test_vnf_create():
)
vnf = VNF(
- SOFTWARE_PRODUCT_NAME,
- VNF_NAME,
- RESOURCE_TYPE,
+ software_product_name=SOFTWARE_PRODUCT_NAME,
+ vnf_name=VNF_NAME,
+ resource_type=RESOURCE_TYPE,
vm_types=[{"vm_type": "red", "properties": {"nf_role": "blue"}}],
)
-
+ vnf.create()
vnf._submit()
assert "componentInstancesInputs" in vnf.tosca
diff --git a/onap-client/onap_client/sdc/tests/test_vsp.py b/onap-client/onap_client/sdc/tests/test_vsp.py
index f14e16e..cd35a90 100644
--- a/onap-client/onap_client/sdc/tests/test_vsp.py
+++ b/onap-client/onap_client/sdc/tests/test_vsp.py
@@ -102,15 +102,16 @@ def test_vsp_create():
mockup_client(oc.sdc.vsp)
vsp = sdc.vsp.VSP(
- "vendor_name",
- LICENSE_MODEL_NAME,
- "{}/test.zip".format(THIS_DIR),
- "application/zip",
- VSP_NAME,
- "description",
- "category",
- "sub_category",
+ vendor_name="vendor_name",
+ license_model_name=LICENSE_MODEL_NAME,
+ file_path="{}/test.zip".format(THIS_DIR),
+ file_type="application/zip",
+ software_product_name=VSP_NAME,
+ description="description",
+ category="category",
+ sub_category="sub_category",
contributers=["test123"],
)
+ vsp.create()
assert vsp.tosca == {"name": VSP_NAME}