def get_worker_id(self): return worker.get_worker_id(self._request)
def test_get_worker_id(self): req = _make_request(self._worker) w_id = worker.get_worker_id(req) self.assertEqual(w_id, 1)
def test_get_worker_id(self): with self.assertRaises(PermissionDenied): worker.get_worker_id(_make_request(None, False))
def test_get_worker_id(self): req = _make_request(self._worker) w_id = worker.get_worker_id(req) assert isinstance(w_id, int)