def to_proto(self) -> core_pb2.MoveNodesRequest: position = self.position.to_proto() if self.position else None geo = self.geo.to_proto() if self.geo else None return core_pb2.MoveNodesRequest( session_id=self.session_id, node_id=self.node_id, source=self.source, position=position, geo=geo, )
def test_move_nodes_exception(self, grpc_server: CoreGrpcServer): # given client = CoreGrpcClient() session = grpc_server.coreemu.create_session() streamer = MoveNodesStreamer(session.id) request = core_pb2.MoveNodesRequest() streamer.send(request) streamer.stop() # then with pytest.raises(grpc.RpcError): with client.context_connect(): client.move_nodes(streamer)
def move_iter(): yield core_pb2.MoveNodesRequest()
def move_iter(): yield core_pb2.MoveNodesRequest( session_id=session.id, node_id=node.id, geo=core_pb2.Geo(lon=lon, lat=lat, alt=alt), )
def move_iter(): yield core_pb2.MoveNodesRequest( session_id=session.id, node_id=node.id, position=core_pb2.Position(x=x, y=y), )