-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.
# 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
class ResourceTest(TestCase):
def setUp(self):
- self.client = Client()
+ self.client = APIClient()
self.nf_inst_id = "01"
NfInstModel.objects.all().delete()
self.test_data = {
'DEFAULT_PARSER_CLASSES': (
'rest_framework.parsers.JSONParser',
- 'rest_framework.parsers.MultiPartParser',
- # 'rest_framework.parsers.FormParser',
- # 'rest_framework.parsers.FileUploadParser',
)
}