summaryrefslogtreecommitdiffstats
path: root/utils/test/result_collection_api/tests/unit/test_pod.py
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2016-05-26 18:07:35 +0800
committerSerenaFeng <feng.xiaowei@zte.com.cn>2016-05-26 18:17:41 +0800
commit00355a8df9949edc12c41d5a8475fc17efbb03d3 (patch)
tree55a3d1a807882e8d1294f66ef248f923b3ffe6ae /utils/test/result_collection_api/tests/unit/test_pod.py
parenta7d4197cef093a5eae141efa34c0833c76a1f183 (diff)
swagger-ize pod-apis of testAPI
JIRA: FUNCTEST-263 Change-Id: I293e05f565f882ea39bbf6368405f10241269716 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'utils/test/result_collection_api/tests/unit/test_pod.py')
-rw-r--r--utils/test/result_collection_api/tests/unit/test_pod.py12
1 files changed, 12 insertions, 0 deletions
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)