X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=lcm%2Flcm%2Fnf%2Ftests%2Ftest_instantiate_vnf.py;h=f8dba91edafa3c07cfce5ff2b559118a7956dd53;hb=refs%2Fchanges%2F44%2F91144%2F1;hp=c243c44bbacdd25af35920b6fc85c00e0f839713;hpb=da7fa99b4472a891d9e0ab16e0224acdc4f63e8e;p=vfc%2Fgvnfm%2Fvnflcm.git diff --git a/lcm/lcm/nf/tests/test_instantiate_vnf.py b/lcm/lcm/nf/tests/test_instantiate_vnf.py index c243c44b..f8dba91e 100644 --- a/lcm/lcm/nf/tests/test_instantiate_vnf.py +++ b/lcm/lcm/nf/tests/test_instantiate_vnf.py @@ -428,7 +428,7 @@ class TestNFInstantiate(TestCase): self.assertEqual(status.HTTP_400_BAD_REQUEST, response.status_code) @mock.patch.object(restcall, 'call_req') - def test_instantiate_operating_fail(self, mock_call_req): + def test_instantiate_operating_conflict(self, mock_call_req): NfInstModel.objects.create( nfinstid='1111', nf_name='vFW_01', @@ -457,13 +457,12 @@ class TestNFInstantiate(TestCase): id=self.job_id, operation=const.OPERATION_TYPE.INSTANTIATE, operation_state=const.OPERATION_STATE_TYPE.PROCESSING) - InstantiateVnf( - inst_req_data, - nf_inst_id=self.nf_inst_id, - job_id=self.job_id - ).run() - self.assert_job_result( - self.job_id, - 255, - 'VNF(%s) %s in processing.' % (self.nf_inst_id, const.OPERATION_TYPE.INSTANTIATE) + response = self.client.post( + '/api/vnflcm/v1/vnf_instances/1111/instantiate', + data=inst_req_data, + format='json' + ) + self.assertEqual( + status.HTTP_409_CONFLICT, + response.status_code )