summaryrefslogtreecommitdiffstats
path: root/result_collection_api/tests/unit/test_project.py
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2016-05-26 20:32:02 +0800
committerSerenaFeng <feng.xiaowei@zte.com.cn>2016-05-26 20:40:13 +0800
commit07b1553b8f00933d7d0f057ac1558a4f7d80245e (patch)
treeb2d160394f074c7cf0caf96c0388d5343cd90f6b /result_collection_api/tests/unit/test_project.py
parent533e640ee68b1d5839f3b5385caf9b773083a6a0 (diff)
swagger-ize project-apis of testAPI
rename pod_handler.py to pod_handlers.py JIRA: FUNCTEST-264 Change-Id: I8699999776bdb238f680a128b83cea0a098534c5 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'result_collection_api/tests/unit/test_project.py')
-rw-r--r--result_collection_api/tests/unit/test_project.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/result_collection_api/tests/unit/test_project.py b/result_collection_api/tests/unit/test_project.py
index c380780..b07cb7a 100644
--- a/result_collection_api/tests/unit/test_project.py
+++ b/result_collection_api/tests/unit/test_project.py
@@ -30,6 +30,18 @@ class TestProjectCreate(TestProjectBase):
(code, body) = self.create()
self.assertEqual(code, HTTP_BAD_REQUEST)
+ def test_emptyName(self):
+ req_empty = ProjectCreateRequest('')
+ (code, body) = self.create(req_empty)
+ self.assertEqual(code, HTTP_BAD_REQUEST)
+ self.assertIn('project name missing', body)
+
+ def test_noneName(self):
+ req_none = ProjectCreateRequest(None)
+ (code, body) = self.create(req_none)
+ self.assertEqual(code, HTTP_BAD_REQUEST)
+ self.assertIn('project name missing', body)
+
def test_success(self):
(code, body) = self.create_d()
self.assertEqual(code, HTTP_OK)