def UploadGraph(self, request, context):
     resp = graph_nav_pb2.UploadGraphResponse()
     resp.CopyFrom(self.upload_graph_resp)
     resp.header.error.code = self.common_header_code
     if self.lease_use_result:
         resp.lease_use_result.CopyFrom(self.lease_use_result)
     return resp
 def __init__(self):
     super(MockGraphNavServicer, self).__init__()
     self.common_header_code = header_pb2.CommonError.CODE_OK
     self.nav_feedback_status = graph_nav_pb2.NavigationFeedbackResponse.STATUS_REACHED_GOAL
     self.nav_to_resp = graph_nav_pb2.NavigateToResponse(
         status=graph_nav_pb2.NavigateToResponse.STATUS_OK)
     self.nav_route_resp = graph_nav_pb2.NavigateRouteResponse(
         status=graph_nav_pb2.NavigateRouteResponse.STATUS_OK)
     self.upload_waypoint_resp = graph_nav_pb2.UploadWaypointSnapshotResponse(
     )
     self.upload_edge_resp = graph_nav_pb2.UploadEdgeSnapshotResponse()
     self.set_loc_resp = graph_nav_pb2.SetLocalizationResponse(
         status=graph_nav_pb2.SetLocalizationResponse.STATUS_OK)
     self.upload_graph_resp = graph_nav_pb2.UploadGraphResponse(
         status=graph_nav_pb2.UploadGraphResponse.STATUS_OK)
     self.download_wp_snapshot_status = graph_nav_pb2.DownloadWaypointSnapshotResponse.STATUS_OK
     self.download_edge_snapshot_status = graph_nav_pb2.DownloadEdgeSnapshotResponse.STATUS_OK
     self.lease_use_result = None