aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGao Weitao <victor.gao@huawei.com>2018-06-07 02:41:23 +0000
committerGerrit Code Review <gerrit@onap.org>2018-06-07 02:41:23 +0000
commit439dd5d538f23c0c10193f96260925bd153c7516 (patch)
tree42792d4fcf1a2b0d29aae31c67e032af4385ce2a
parent95095eec073d0aae71b2b353da0d4ba7d3fe9067 (diff)
parent8183effdd2d2d855aa8a7b6c7a58d436783ef818 (diff)
Merge "remove swagger test function"
-rw-r--r--lcm/ns/tests/test_ns_instant.py6
-rw-r--r--lcm/ns/tests/test_ns_manual_scale.py6
-rw-r--r--lcm/swagger/tests.py8
3 files changed, 11 insertions, 9 deletions
diff --git a/lcm/ns/tests/test_ns_instant.py b/lcm/ns/tests/test_ns_instant.py
index 544c3743..6e50cb6a 100644
--- a/lcm/ns/tests/test_ns_instant.py
+++ b/lcm/ns/tests/test_ns_instant.py
@@ -11,7 +11,8 @@
# 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
@@ -55,8 +56,9 @@ class TestNsInstant(TestCase):
'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)
+ """
diff --git a/lcm/ns/tests/test_ns_manual_scale.py b/lcm/ns/tests/test_ns_manual_scale.py
index a5134c7d..6526ffca 100644
--- a/lcm/ns/tests/test_ns_manual_scale.py
+++ b/lcm/ns/tests/test_ns_manual_scale.py
@@ -280,9 +280,9 @@ class TestNsManualScale(TestCase):
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):
diff --git a/lcm/swagger/tests.py b/lcm/swagger/tests.py
index 4f2e6522..9bc1cef5 100644
--- a/lcm/swagger/tests.py
+++ b/lcm/swagger/tests.py
@@ -12,7 +12,7 @@
import unittest
from django.test import Client
-from rest_framework import status
+# from rest_framework import status
class SwaggerViewTest(unittest.TestCase):
@@ -22,6 +22,6 @@ class SwaggerViewTest(unittest.TestCase):
def tearDown(self):
pass
- 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)