f8147ece74bd3ce9f95e429b2f0cab883158a106
[multicloud/framework.git] / multivimbroker / multivimbroker / swagger / tests.py
1 # Copyright (c) 2017 Wind River Systems, Inc.
2 #
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
7 #
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.
11
12 import unittest
13 import json
14 from django.test import Client
15 from rest_framework import status
16
17
18 class SampleViewTest(unittest.TestCase):
19     def setUp(self):
20         self.client = Client()
21
22     def tearDown(self):
23         pass
24
25     def test_sample(self):
26         response = self.client.get("/api/multicloud/v0/swagger.json")
27         self.assertEqual(status.HTTP_200_OK, response.status_code, response.content)
28 #        resp_data = json.loads(response.content)
29 #        self.assertEqual({"status": "active"}, resp_data)