Example #1
0
def test_node_parameters_none(fixed_nodenet):
    nodenet = micropsi.nodenets[fixed_nodenet]
    micropsi.add_node(fixed_nodenet, 'Trigger', [30, 30], uid='testtrigger', name='test')
    node = nodenet.netapi.get_node('testtrigger')
    micropsi.set_node_parameters(fixed_nodenet, node.uid, {'response': '', 'timeout': 0})
    assert node.get_parameter('response') is None
    assert node.get_parameter('timeout') == 0
Example #2
0
def test_node_parameters_none_resets_to_default(fixed_nodenet):
    nodenet = micropsi.nodenets[fixed_nodenet]
    res, uid = micropsi.add_node(fixed_nodenet, 'Pipe', [30, 30], name='test')
    node = nodenet.netapi.get_node(uid)
    micropsi.set_node_parameters(fixed_nodenet, node.uid, {'expectation': '', 'wait': 0})
    assert node.get_parameter('expectation') == 1
    assert node.get_parameter('wait') == 0
Example #3
0
def set_node_parameters(nodenet_uid, node_uid, parameters):
    return runtime.set_node_parameters(nodenet_uid, node_uid, parameters)
Example #4
0
def set_node_parameters(nodenet_uid, node_uid, parameters):
    """ Set the parameters of this node"""
    return runtime.set_node_parameters(nodenet_uid, node_uid, parameters)