summaryrefslogtreecommitdiffstats
path: root/result_collection_api/tests/unit/test_project.py
diff options
context:
space:
mode:
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)