refactored session.update_node to session.edit_node to match grpc call

This commit is contained in:
bharnden 2019-10-22 20:55:06 -07:00
parent cb81095b64
commit 14d759667c
4 changed files with 5 additions and 5 deletions

View file

@ -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:

View file

@ -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

View file

@ -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

View file

@ -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