refactored session.update_node to session.edit_node to match grpc call
This commit is contained in:
parent
cb81095b64
commit
14d759667c
4 changed files with 5 additions and 5 deletions
|
@ -867,7 +867,7 @@ class CoreGrpcServer(core_pb2_grpc.CoreApiServicer):
|
|||
options.set_location(lat, lon, alt)
|
||||
result = True
|
||||
try:
|
||||
session.update_node(node.id, options)
|
||||
session.edit_node(node.id, options)
|
||||
node_data = node.data(0)
|
||||
session.broadcast_node(node_data)
|
||||
except CoreError:
|
||||
|
|
|
@ -748,7 +748,7 @@ class CoreHandler(socketserver.BaseRequestHandler):
|
|||
replies.append(coreapi.CoreNodeMessage.pack(flags, tlvdata))
|
||||
# node update
|
||||
else:
|
||||
self.session.update_node(node_id, options)
|
||||
self.session.edit_node(node_id, options)
|
||||
|
||||
return replies
|
||||
|
||||
|
|
|
@ -722,9 +722,9 @@ class Session(object):
|
|||
|
||||
return node
|
||||
|
||||
def update_node(self, node_id, options):
|
||||
def edit_node(self, node_id, options):
|
||||
"""
|
||||
Update node information.
|
||||
Edit node information.
|
||||
|
||||
:param int node_id: id of node to update
|
||||
:param core.emulator.emudata.NodeOptions options: data to update node with
|
||||
|
|
|
@ -40,7 +40,7 @@ class TestNodes:
|
|||
update_options.set_position(x=position_value, y=position_value)
|
||||
|
||||
# when
|
||||
session.update_node(node.id, update_options)
|
||||
session.edit_node(node.id, update_options)
|
||||
|
||||
# then
|
||||
assert node.position.x == position_value
|
||||
|
|
Loading…
Reference in a new issue