summaryrefslogtreecommitdiffstats
path: root/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
commit533e640ee68b1d5839f3b5385caf9b773083a6a0 (patch)
tree7294777ed70cb8e4f77ba3dceda8d653d2c35590 /result_collection_api/tests/unit/test_pod.py
parent23cb96f23bcbfe140202e7cce8ec7aa7ec31c67b (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 'result_collection_api/tests/unit/test_pod.py')
-rw-r--r--result_collection_api/tests/unit/test_pod.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/result_collection_api/tests/unit/test_pod.py b/result_collection_api/tests/unit/test_pod.py
index d7f4c3a..8a93027 100644
--- a/result_collection_api/tests/unit/test_pod.py
+++ b/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)