def test_get_worker_info(self): req = _make_request(self._worker) wi = worker.get_worker_info(req) self.assertFalse(wi is None) self.assertEqual(wi['task_count'], 0) self.assertEqual(wi['current_load'], 0) self.assertEqual(wi['max_load'], 1) self.assertTrue(wi['ready']) self.assertTrue(wi['enabled'])
def get_worker_info(self): return worker.get_worker_info(self._request)
def test_get_worker_info(self): with self.assertRaises(PermissionDenied): worker.get_worker_info(_make_request(None, False))