summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2019-03-27 19:21:26 +0800
committerfujinhua <fu.jinhua@zte.com.cn>2019-03-27 19:21:26 +0800
commitc101dd9f00a74032f0ad0f1c2231b2afd37c9e9e (patch)
tree22cdf5dc788e5252d4960f2faab5ff6f3576d3f6
parent181d8c6c2a88ca264ec9d7f5a341c73daaa59e5c (diff)
Fix heal vnf test cases
Change-Id: I785064977877b984a5d164d677e89872204655cd Issue-ID: VFC-1306 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
-rw-r--r--lcm/lcm/nf/tests/test_heal_vnf.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/lcm/lcm/nf/tests/test_heal_vnf.py b/lcm/lcm/nf/tests/test_heal_vnf.py
index 08721b71..17f3e5e8 100644
--- a/lcm/lcm/nf/tests/test_heal_vnf.py
+++ b/lcm/lcm/nf/tests/test_heal_vnf.py
@@ -57,11 +57,20 @@ class TestNFInstantiate(TestCase):
@mock.patch.object(HealVnf, 'run')
def test_heal_vnf_success(self, mock_run):
req_data = {}
- NfInstModel(nfinstid='12', nf_name='VNF1', status='INSTANTIATED').save()
+ NfInstModel(nfinstid='12',
+ nf_name='VNF1',
+ nf_desc="VNF DESC",
+ vnfdid="1",
+ netype="XGW",
+ vendor="ZTE",
+ vnfSoftwareVersion="V1",
+ version="V1",
+ package_id="2",
+ status='INSTANTIATED').save()
response = self.client.post("/api/vnflcm/v1/vnf_instances/12/heal", data=req_data, format='json')
mock_run.re.return_value = None
self.failUnlessEqual(status.HTTP_202_ACCEPTED, response.status_code)
- NfInstModel(nfinstid='12', nf_name='VNF1', status='INSTANTIATED').delete()
+ NfInstModel(nfinstid='12').delete()
@mock.patch.object(restcall, 'call_req')
@mock.patch.object(api, 'call')