From 00355a8df9949edc12c41d5a8475fc17efbb03d3 Mon Sep 17 00:00:00 2001 From: SerenaFeng Date: Thu, 26 May 2016 18:07:35 +0800 Subject: swagger-ize pod-apis of testAPI JIRA: FUNCTEST-263 Change-Id: I293e05f565f882ea39bbf6368405f10241269716 Signed-off-by: SerenaFeng --- utils/test/result_collection_api/tests/unit/test_pod.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'utils/test/result_collection_api/tests/unit/test_pod.py') diff --git a/utils/test/result_collection_api/tests/unit/test_pod.py b/utils/test/result_collection_api/tests/unit/test_pod.py index d7f4c3a63..8a9302738 100644 --- a/utils/test/result_collection_api/tests/unit/test_pod.py +++ b/utils/test/result_collection_api/tests/unit/test_pod.py @@ -32,6 +32,18 @@ class TestPodCreate(TestPodBase): (code, body) = self.create() self.assertEqual(code, HTTP_BAD_REQUEST) + def test_emptyName(self): + req_empty = PodCreateRequest('') + (code, body) = self.create(req_empty) + self.assertEqual(code, HTTP_BAD_REQUEST) + self.assertIn('pod name missing', body) + + def test_noneName(self): + req_none = PodCreateRequest(None) + (code, body) = self.create(req_none) + self.assertEqual(code, HTTP_BAD_REQUEST) + self.assertIn('pod name missing', body) + def test_success(self): code, body = self.create_d() self.assertEqual(code, HTTP_OK) -- cgit 1.2.3-korg