swagger-ize project-apis of testAPI
[releng.git] / utils / test / result_collection_api / tests / unit / test_project.py
index c380780..b07cb7a 100644 (file)
@@ -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)