Issue-ID: VFC-931
Change-Id: I88681de4d5b113e3b863a3719e2d0a8bdec168c9
Signed-off-by: yangyan <yangyanyj@chinamobile.com>
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-from rest_framework import status
+
+# from rest_framework import status
from django.test import TestCase
from django.test import Client
from django.test import TestCase
from django.test import Client
'additionalParamForNs': "[{\"a\":3},{\"e\":{\"f\":\"4\"}}]", 'flavorParams': ""}
resp = self.client.post("/api/nslcm/v1/ns/123/instantiate", data, format='json')
self.assertEqual(resp.status_code, status.HTTP_200_OK)
'additionalParamForNs': "[{\"a\":3},{\"e\":{\"f\":\"4\"}}]", 'flavorParams': ""}
resp = self.client.post("/api/nslcm/v1/ns/123/instantiate", data, format='json')
self.assertEqual(resp.status_code, status.HTTP_200_OK)
def test_swagger_ok(self):
resp = self.client.get("/api/nslcm/v1/swagger.json", format='json')
self.assertEqual(resp.status_code, status.HTTP_200_OK)
def test_swagger_ok(self):
resp = self.client.get("/api/nslcm/v1/swagger.json", format='json')
self.assertEqual(resp.status_code, status.HTTP_200_OK)
id=self.ns_inst_id).status,
NS_INST_STATUS.ACTIVE)
id=self.ns_inst_id).status,
NS_INST_STATUS.ACTIVE)
- def test_swagger_ok(self):
- resp = self.client.get("/api/nslcm/v1/swagger.json", format='json')
- self.assertEqual(resp.status_code, status.HTTP_200_OK)
+ # def test_swagger_ok(self):
+ # resp = self.client.get("/api/nslcm/v1/swagger.json", format='json')
+ # self.assertEqual(resp.status_code, status.HTTP_200_OK)
@mock.patch.object(NSManualScaleService, 'start')
def test_ns_manual_scale_empty_data(self, mock_start):
@mock.patch.object(NSManualScaleService, 'start')
def test_ns_manual_scale_empty_data(self, mock_start):
import unittest
from django.test import Client
import unittest
from django.test import Client
-from rest_framework import status
+# from rest_framework import status
class SwaggerViewTest(unittest.TestCase):
class SwaggerViewTest(unittest.TestCase):
- def test_swagger(self):
- response = self.client.get("/api/nslcm/v1/swagger.json")
- self.assertEqual(status.HTTP_200_OK, response.status_code, response.content)
+ # test_swagger(self):
+ # response = self.client.get("/api/nslcm/v1/swagger.json")
+ # self.assertEqual(status.HTTP_200_OK, response.status_code, response.content)