aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbiancunkang <bian.cunkang@zte.com.cn>2018-08-27 17:46:34 +0800
committerbiancunkang <bian.cunkang@zte.com.cn>2018-08-27 17:46:34 +0800
commit79960e87b7348e50352dd27f12a74db053c27477 (patch)
treed1dbbb56dc4493652d46a08a18727ce3f9eb4ebe
parent79b28a31801ba85c2cb392c103df6381b8fc44e0 (diff)
Deal with nfPackage
Add a test Change-Id: I64d2befe7eda03bf57649dff4df96b8b5c6d98ca Issue-ID: VFC-1038 Signed-off-by: biancunkang <bian.cunkang@zte.com.cn>
-rw-r--r--catalog/packages/tests/test_vnf_package.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/catalog/packages/tests/test_vnf_package.py b/catalog/packages/tests/test_vnf_package.py
index 9a672ee5..34a1a121 100644
--- a/catalog/packages/tests/test_vnf_package.py
+++ b/catalog/packages/tests/test_vnf_package.py
@@ -391,3 +391,21 @@ class TestVnfPackage(TestCase):
]
self.assertEqual(response.data, expect_data)
self.assertEqual(response.status_code, status.HTTP_200_OK)
+
+ def test_delete_single_vnf_pkg(self):
+ VnfPackageModel.objects.create(
+ vnfPackageId="222",
+ vnfdId="zte-hss-1.0",
+ vnfVendor="zte",
+ vnfdProductName="hss",
+ vnfSoftwareVersion="1.0.0",
+ vnfdVersion="1.0.0",
+ checksum='{"algorithm":"111", "hash": "11"}',
+ onboardingState="CREATED",
+ operationalState="DISABLED",
+ usageState="NOT_IN_USE",
+ userDefinedData='{"a": "A"}'
+ )
+ response = self.client.delete("/api/vnfpkgm/v1/vnf_packages/222")
+ self.assertEqual(response.status_code, status.HTTP_204_NO_CONTENT)
+ self.assertEqual(response.data, None)