MCPcopy Create free account
hub / github.com/FreeOpcUa/python-opcua / test_add_nodes

Method test_add_nodes

tests/tests_common.py:602–619  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

600 self.assertEqual(result.OutputArguments, [])
601
602 def test_add_nodes(self):
603 objects = self.opc.get_objects_node()
604 f = objects.add_folder(3, 'MyFolder')
605 child = objects.get_child("3:MyFolder")
606 self.assertEqual(child, f)
607 o = f.add_object(3, 'MyObject')
608 child = f.get_child("3:MyObject")
609 self.assertEqual(child, o)
610 v = f.add_variable(3, 'MyVariable', 6)
611 child = f.get_child("3:MyVariable")
612 self.assertEqual(child, v)
613 p = f.add_property(3, 'MyProperty', 10)
614 child = f.get_child("3:MyProperty")
615 self.assertEqual(child, p)
616 childs = f.get_children()
617 self.assertTrue(o in childs)
618 self.assertTrue(v in childs)
619 self.assertTrue(p in childs)
620
621 def test_modelling_rules(self):
622 obj = self.opc.nodes.base_object_type.add_object_type(2, 'MyFooObjectType')

Callers

nothing calls this directly

Calls 7

add_folderMethod · 0.80
get_childMethod · 0.80
get_childrenMethod · 0.80
get_objects_nodeMethod · 0.45
add_objectMethod · 0.45
add_variableMethod · 0.45
add_propertyMethod · 0.45

Tested by

no test coverage detected