Fix vfc-gvnfm-vnfmgr pep8 W293 issue. 15/14815/3
authorying.yunlong <ying.yunlong@zte.com.cn>
Sat, 23 Sep 2017 06:07:58 +0000 (14:07 +0800)
committerFu Jinhua <fu.jinhua@zte.com.cn>
Sat, 23 Sep 2017 07:12:01 +0000 (07:12 +0000)
Change-Id: Iebecf5e66032096700442fbe43fbf5f8e31982a9
Issue-ID: VFC-443
Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
mgr/mgr/vnfreg/tests.py
mgr/tox.ini

index b3ffccc..6d95081 100644 (file)
@@ -118,13 +118,13 @@ class VnfRegTest(unittest.TestCase):
             "password": vnfs[0].password
         }
         self.assertEqual(self.vnfInst1, vnfInstActual)
-        
+
     def test_add_vnf_when_duplicate(self):
         self.client.post("/api/vnfmgr/v1/vnfs", self.vnfInst1, format='json')
         response = self.client.post("/api/vnfmgr/v1/vnfs", self.vnfInst1, format='json')
         self.assertEqual(status.HTTP_500_INTERNAL_SERVER_ERROR, response.status_code, response.content)
         self.assertEqual({'error': "Vnf(1) already exists."}, json.loads(response.content))
-        
+
     def test_set_vnf_normal(self):
         self.client.post("/api/vnfmgr/v1/vnfs", self.vnfInst1, format='json')
         response = self.client.put("/api/vnfmgr/v1/vnfs/1",
@@ -140,41 +140,41 @@ class VnfRegTest(unittest.TestCase):
             "password": vnfs[0].password
         }
         self.assertEqual(self.vnfInst1_new, vnfInstActual)
-        
+
     def test_set_vnf_when_not_exist(self):
         response = self.client.put("/api/vnfmgr/v1/vnfs/1",
             json.dumps(self.vnfInst1_new), content_type='application/json')
         self.assertEqual(status.HTTP_404_NOT_FOUND, response.status_code, response.content)
         self.assertEqual({'error': "Vnf(1) does not exist."}, json.loads(response.content))
-        
+
     def test_get_vnf_normal(self):
         self.client.post("/api/vnfmgr/v1/vnfs", self.vnfInst1, format='json')
         response = self.client.get("/api/vnfmgr/v1/vnfs/1")
         self.assertEqual(status.HTTP_200_OK, response.status_code, response.content)
         self.assertEqual(self.vnfInst1, json.loads(response.content))
-        
+
     def test_get_vnf_when_not_exist(self):
         response = self.client.get("/api/vnfmgr/v1/vnfs/1")
         self.assertEqual(status.HTTP_404_NOT_FOUND, response.status_code, response.content)
         self.assertEqual({'error': "Vnf(1) does not exist."}, json.loads(response.content))
-        
+
     def test_del_vnf_normal(self):
         self.client.post("/api/vnfmgr/v1/vnfs", self.vnfInst1, format='json')
         response = self.client.delete("/api/vnfmgr/v1/vnfs/1")
         self.assertEqual(status.HTTP_204_NO_CONTENT, response.status_code, response.content)
-        
+
     def test_del_vnf_when_not_exist(self):
         response = self.client.delete("/api/vnfmgr/v1/vnfs/1")
         self.assertEqual(status.HTTP_404_NOT_FOUND, response.status_code, response.content)
         self.assertEqual({'error': "Vnf(1) does not exist."}, json.loads(response.content))
-        
+
     @mock.patch.object(restcall, 'call_req')
     def test_vnf_config_normal(self, mock_call_req):
         mock_call_req.return_value = [0, "", '204']
         self.client.post("/api/vnfmgr/v1/vnfs", self.vnfInst1, format='json')
         response = self.client.post("/api/vnfmgr/v1/configuration", self.vnfconfig, format='json')
         self.assertEqual(status.HTTP_202_ACCEPTED, response.status_code, response.content)
-        
+
     def test_vnf_config_when_not_exist(self):
         response = self.client.post("/api/vnfmgr/v1/configuration", self.vnfconfig, format='json')
         self.assertEqual(status.HTTP_500_INTERNAL_SERVER_ERROR, response.status_code, response.content)
index 86ffd21..7cd3add 100644 (file)
@@ -6,7 +6,7 @@ skipsdist = true
 downloadcache = ~/cache/pip
 
 [flake8]
-ignore =  E501,W293,E128
+ignore =  E501,E128
 
 [testenv]
 deps = -r{toxinidir}/requirements.txt