Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_wait(self):
with self.assertRaises(PermissionDenied):
worker.wait(_make_request(None, False), 1)
def test_check_wait(self):
with self.assertRaises(PermissionDenied):
worker.check_wait(_make_request(None, False), 1)
def test_get_awaited_tasks(self):
with self.assertRaises(PermissionDenied):
worker.get_awaited_tasks(_make_request(None, False), [])
def test_get_worker_info(self):
with self.assertRaises(PermissionDenied):
worker.get_worker_info(_make_request(None, False))
def test_assign_task(self):
with self.assertRaises(PermissionDenied):
worker.assign_task(_make_request(None, False), 1)
def test_fail_task(self):
with self.assertRaises(PermissionDenied):
worker.fail_task(_make_request(None, False), 1, None)
def test_update_worker(self):
with self.assertRaises(PermissionDenied):
worker.update_worker(_make_request(None, False), True, True, 0)
def test_get_task_no_verify(self):
with self.assertRaises(PermissionDenied):
worker.get_task_no_verify(_make_request(None, False), 1)
def test_timeout_tasks(self):
with self.assertRaises(PermissionDenied):
worker.timeout_tasks(_make_request(None, False), [])
def test_get_tasks_to_assign(self):
with self.assertRaises(PermissionDenied):
worker.get_tasks_to_assign(_make_request(None, False))