# -*- coding: utf-8 -*-
from __future__ import absolute_import
-from .helper import DashboardTestCase, JObj
+from tasks.mgr.dashboard.helper import DashboardTestCase, JObj
class PerfCountersControllerTest(DashboardTestCase):
self._validate_perf(mon, 'mon', data, allow_empty=False)
def test_perf_counters_mgr_get(self):
- mgr = self.mgr_cluster.mgr_ids[0]
+ mgr = list(self.mgr_cluster.mgr_ids)[0]
data = self._get('/api/perf_counters/mgr/{}'.format(mgr))
self.assertStatus(200)
self._validate_perf(mgr, 'mgr', data, allow_empty=False)
self.assertStatus(404)
schema = JObj(sub_elems={
'status': str,
- 'version': str,
'detail': str,
- 'traceback': str,
- })
+ }, allow_unknown=True)
self.assertEqual(self._resp.json()['detail'], "'osd.{}' not found".format(unused_id))
self.assertSchemaBody(schema)