diff options
author | ying.yunlong <ying.yunlong@zte.com.cn> | 2018-02-09 16:00:04 +0800 |
---|---|---|
committer | ying.yunlong <ying.yunlong@zte.com.cn> | 2018-02-09 16:00:04 +0800 |
commit | 6f56a189f48cdcf205e09bd50b08e3efda7b236b (patch) | |
tree | 654c62894c7bbb3912fd660839d34cb8e46b3340 /res | |
parent | e9ffe8dc80c90e79938a0a095f6dfa766873b9d8 (diff) |
Fix vfc-vnfres settings
Change-Id: Ie2454d2788a29809f1fe77e20697d9379def11ae
Issue-ID: VFC-679
Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
Diffstat (limited to 'res')
-rw-r--r-- | res/res/resources/tests.py | 5 | ||||
-rw-r--r-- | res/res/settings.py | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/res/res/resources/tests.py b/res/res/resources/tests.py index d78e166..8d05bf5 100644 --- a/res/res/resources/tests.py +++ b/res/res/resources/tests.py @@ -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 = { diff --git a/res/res/settings.py b/res/res/settings.py index e8da4e0..988e049 100644 --- a/res/res/settings.py +++ b/res/res/settings.py @@ -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', ) } |