diff options
author | 2018-03-13 10:52:59 +0800 | |
---|---|---|
committer | 2018-03-13 10:54:49 +0800 | |
commit | f71ca1115be830e8ccb2e155942f9b1d37d01e70 (patch) | |
tree | f7600de9c1600efa76fc03502f5598e0d1aa3630 | |
parent | b61b00154114eb2624212396f886af7204e8bb81 (diff) |
Modify the code of scaling vnf
Change-Id: I0b7dbedc0ef498f8210d10b331667f0e49fe6968
Issue-ID: VFC-784
Signed-off-by: fengyuanxing <feng.yuanxing@zte.com.cn>
-rw-r--r-- | lcm/ns/tests/vnfs/tests.py | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/lcm/ns/tests/vnfs/tests.py b/lcm/ns/tests/vnfs/tests.py index 4d4f84ba..b14dea12 100644 --- a/lcm/ns/tests/vnfs/tests.py +++ b/lcm/ns/tests/vnfs/tests.py @@ -303,10 +303,7 @@ class TestScaleVnfViews(TestCase): NSInstModel.objects.all().delete() NfInstModel.objects.all().delete() - @mock.patch.object(restcall, "call_req") - def test_scale_vnf(self, mock_call_req): - job_id = JobUtil.create_job("VNF", JOB_TYPE.TERMINATE_VNF, self.nf_inst_id) - + def test_scale_vnf(self): vnfd_info = { "vnf_flavours": [{ "flavour_id": "flavour1", @@ -361,16 +358,6 @@ class TestScaleVnfViews(TestCase): ] } - mock_vals = { - "/api/ztevnfmdriver/v1/1/vnfs/111/terminate": - [0, json.JSONEncoder().encode({"jobId": job_id}), '200'] - } - - def side_effect(*args): - return mock_vals[args[4]] - - mock_call_req.side_effect = side_effect - NFManualScaleService(self.nf_inst_id, req_data).run() nsIns = NfInstModel.objects.filter(nfinstid=self.nf_inst_id) self.assertIsNotNone(nsIns) |