support 'GET /dashboard/v1/projects' REST api in testAPI
[releng.git] / utils / test / result_collection_api / opnfv_testapi / tests / unit / test_dashboard_project.py
1 import json
2
3 from opnfv_testapi.common.constants import HTTP_OK
4 from test_base import TestBase
5
6
7 class TestDashboardProjectBase(TestBase):
8     def setUp(self):
9         super(TestDashboardProjectBase, self).setUp()
10         self.basePath = '/dashboard/v1/projects'
11         self.list_res = None
12         self.projects = ['bottlenecks', 'doctor', 'functest',
13                          'promise', 'qtip', 'vsperf', 'yardstick']
14
15
16 class TestDashboardProjectGet(TestDashboardProjectBase):
17     def test_list(self):
18         code, body = self.get()
19         self.assertEqual(code, HTTP_OK)
20         self.assertItemsEqual(self.projects, json.loads(body))