diff options
author | maopengzhang <zhang.maopeng1@zte.com.cn> | 2019-03-30 15:31:28 +0800 |
---|---|---|
committer | maopengzhang <zhang.maopeng1@zte.com.cn> | 2019-03-30 15:31:28 +0800 |
commit | e3f2c6dbbde2ba3f420c365ea745fe6828510908 (patch) | |
tree | 94af467543048f6ae10f79f25d0f3480639eb503 | |
parent | ecba3f3d5adf3335c5b6a63db5c1a0933cacea79 (diff) |
add occ in terminate test case
add occ in terminate test case
Change-Id: I5abbb563bd5777a2810bddb7084cb47fe9dd6c0e
Issue-ID: VFC-1059
Signed-off-by: maopengzhang <zhang.maopeng1@zte.com.cn>
-rw-r--r-- | lcm/ns/tests/test_sol_ns_terminate_api.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lcm/ns/tests/test_sol_ns_terminate_api.py b/lcm/ns/tests/test_sol_ns_terminate_api.py index 44de00e7..3aa9dc69 100644 --- a/lcm/ns/tests/test_sol_ns_terminate_api.py +++ b/lcm/ns/tests/test_sol_ns_terminate_api.py @@ -25,7 +25,7 @@ class TestTerminateNsApi(TestCase): def setUp(self): self.client = Client() self.url = "/api/nslcm/v1/ns_instances/%s/terminate" - self.ns_inst_id = '1' + self.ns_inst_id = str(uuid.uuid4()) self.nf_inst_id = '1' self.vnffg_id = str(uuid.uuid4()) self.vim_id = str(uuid.uuid4()) @@ -62,6 +62,8 @@ class TestTerminateNsApi(TestCase): response = self.client.post(self.url % self.ns_inst_id, data=req_data) self.failUnlessEqual(status.HTTP_202_ACCEPTED, response.status_code) self.assertIsNotNone(response['Location']) + response = self.client.get(response['Location'], format='json') + self.assertEqual(response.status_code, status.HTTP_200_OK) def test_method_not_allowed(self): response = self.client.put(self.url % '1', data={}, format='json') |