def endpoint_call(self, service, name, args): body = json.loads(protojson.encode_message(args)) return test_case.Endpoints(service).call_api(name, body=body).json
def client_get_results(self, task_id): api = test_case.Endpoints(handlers_endpoints.SwarmingTaskService) return api.call_api('result', body={'task_id': task_id}).json
def endpoint_call(self, service, name, args): srv = test_case.Endpoints(service, source_ip=self.source_ip) if not isinstance(args, dict): args = json.loads(protojson.encode_message(args)) return srv.call_api(name, body=args).json
def setUp(self): super(TaskApiTest, self).setUp() self.tasks_api = test_case.Endpoints( handlers_endpoints.SwarmingTasksService)