- def test_sample(self):
- response = self.client.get("/api/nslcm/v1/swagger.json")
- print response
- self.assertEqual(status.HTTP_200_OK, response.status_code, response.content)
-# resp_data = json.loads(response.content)
-# self.assertEqual({"status": "active"}, resp_data)
+ def test_swagger_json(self):
+ url = "/api/nslcm/v1/swagger.json"
+ response = self.client.get(url, format='json')
+ self.assertEqual(response.status_code, status.HTTP_200_OK)
+ self.assertEqual("2.0", response.data.get("swagger"))