Add a new test case with incorrect scale nsdid 83/35083/1
authorfengyuanxing <feng.yuanxing@zte.com.cn>
Mon, 12 Mar 2018 03:01:39 +0000 (11:01 +0800)
committerfengyuanxing <feng.yuanxing@zte.com.cn>
Mon, 12 Mar 2018 03:01:39 +0000 (11:01 +0800)
Change-Id: Ic949c4db2bc93f70b98340287d514eb1841c2cf6
Issue-ID: VFC-784
Signed-off-by: fengyuanxing <feng.yuanxing@zte.com.cn>
lcm/ns/tests/test_ns_manual_scale.py

index c977ff6..4bec734 100644 (file)
@@ -153,6 +153,21 @@ class TestNsManualScale(TestCase):
         jobs = JobModel.objects.filter(jobid=self.job_id)
         self.assertEqual(255, jobs[0].progress)
 
+    def test_ns_manual_scale_error_nsd_id(self):
+        data = {
+            "scaleType": "SCALE_ERR",
+            "scaleNsData": [{
+                "scaleNsByStepsData": [{
+                    "aspectId": "sss_zte",
+                    "numberOfSteps": 1,
+                    "scalingDirection": "0"
+                }]
+            }]
+        }
+        NSManualScaleService(self.ns_inst_id, data, self.job_id).run()
+        jobs = JobModel.objects.filter(jobid=self.job_id)
+        self.assertEqual(255, jobs[0].progress)
+
     @mock.patch.object(restcall, 'call_req')
     def test_ns_manual_scale_thread(self, mock_call):
         data = {