Esempio n. 1
0
    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 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'])
Esempio n. 3
0
 def get_worker_info(self):
     return worker.get_worker_info(self._request)
Esempio n. 4
0
 def test_get_worker_info(self):
     with self.assertRaises(PermissionDenied):
         worker.get_worker_info(_make_request(None, False))
 def test_get_worker_info(self):
     with self.assertRaises(PermissionDenied):
         worker.get_worker_info(_make_request(None, False))