summaryrefslogtreecommitdiffstats
path: root/result_collection_api/opnfv_testapi/tests/unit
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-06-04 16:58:33 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-06-04 16:58:33 +0000
commitb561bb94f8f5b5e394c693f8b2a0c42995d66d43 (patch)
treedf1a0c26a5dd9b02147ca7a7a56f943a66f77a2b /result_collection_api/opnfv_testapi/tests/unit
parent164651258fa0bad718e2615aa314f356e10d2798 (diff)
parentc255322aaa2f3898b5bb53a7144e3d4e4a9b3b20 (diff)
Merge "support 'GET /dashboard/v1/projects' REST api in testAPI"
Diffstat (limited to 'result_collection_api/opnfv_testapi/tests/unit')
-rw-r--r--result_collection_api/opnfv_testapi/tests/unit/test_dashboard_project.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/result_collection_api/opnfv_testapi/tests/unit/test_dashboard_project.py b/result_collection_api/opnfv_testapi/tests/unit/test_dashboard_project.py
new file mode 100644
index 0000000..f9d2015
--- /dev/null
+++ b/result_collection_api/opnfv_testapi/tests/unit/test_dashboard_project.py
@@ -0,0 +1,20 @@
+import json
+
+from opnfv_testapi.common.constants import HTTP_OK
+from test_base import TestBase
+
+
+class TestDashboardProjectBase(TestBase):
+ def setUp(self):
+ super(TestDashboardProjectBase, self).setUp()
+ self.basePath = '/dashboard/v1/projects'
+ self.list_res = None
+ self.projects = ['bottlenecks', 'doctor', 'functest',
+ 'promise', 'qtip', 'vsperf', 'yardstick']
+
+
+class TestDashboardProjectGet(TestDashboardProjectBase):
+ def test_list(self):
+ code, body = self.get()
+ self.assertEqual(code, HTTP_OK)
+ self.assertItemsEqual(self.projects, json.loads(body))