Fix vfc-vnfres settings 45/31045/1
authorying.yunlong <ying.yunlong@zte.com.cn>
Fri, 9 Feb 2018 08:00:04 +0000 (16:00 +0800)
committerying.yunlong <ying.yunlong@zte.com.cn>
Fri, 9 Feb 2018 08:00:04 +0000 (16:00 +0800)
Change-Id: Ie2454d2788a29809f1fe77e20697d9379def11ae
Issue-ID: VFC-679
Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
LICENSE
res/res/resources/tests.py
res/res/settings.py

diff --git a/LICENSE b/LICENSE
index 28f16fe..47618a8 100644 (file)
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright 2017 ZTE Corporation.
+Copyright 2018 ZTE Corporation.
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
index d78e166..8d05bf5 100644 (file)
@@ -12,8 +12,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from django.test import TestCase, Client
+from django.test import TestCase
 from rest_framework import status
+from rest_framework.test import APIClient
 
 from res.pub.database.models import NfInstModel, StorageInstModel, VmInstModel, FlavourInstModel, NetworkInstModel, \
     SubNetworkInstModel, CPInstModel
@@ -21,7 +22,7 @@ from res.pub.database.models import NfInstModel, StorageInstModel, VmInstModel,
 
 class ResourceTest(TestCase):
     def setUp(self):
-        self.client = Client()
+        self.client = APIClient()
         self.nf_inst_id = "01"
         NfInstModel.objects.all().delete()
         self.test_data = {
index e8da4e0..988e049 100644 (file)
@@ -71,9 +71,6 @@ REST_FRAMEWORK = {
 
     'DEFAULT_PARSER_CLASSES': (
         'rest_framework.parsers.JSONParser',
-        'rest_framework.parsers.MultiPartParser',
-        # 'rest_framework.parsers.FormParser',
-        # 'rest_framework.parsers.FileUploadParser',
     )
 }