1 # Copyright 2016-2017 ZTE Corporation.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at:
6 # http://www.apache.org/licenses/LICENSE-2.0
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 from django.test import TestCase
14 from rest_framework.test import APIClient
15 # from rest_framework import status
18 class SwaggerViewTest(TestCase):
20 self.client = APIClient()
25 # def test_swagger(self):
26 # response = self.client.get("/api/nslcm/v1/swagger.json")
27 # self.assertEqual(status.HTTP_200_OK, response.status_code, response.content)
28 # with open('vfc.json', 'w') as swagger_file:
29 # swagger_file.write(json.dumps(response.data))