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

Method test_path

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

Source from the content-addressed store, hash-verified

714 self.assertEqual(["1:titif", "3:opath"], path)
715
716 def test_path(self):
717 of = self.opc.nodes.objects.add_folder(1, "titif")
718 op = of.add_object(3, "opath")
719 path = op.get_path()
720 self.assertEqual([self.opc.nodes.root, self.opc.nodes.objects, of, op], path)
721 path = op.get_path(2)
722 self.assertEqual([of, op], path)
723 target = self.opc.get_node("i=13387")
724 path = target.get_path()
725 self.assertEqual([self.opc.nodes.root, self.opc.nodes.types, self.opc.nodes.object_types, self.opc.nodes.base_object_type, self.opc.nodes.folder_type, self.opc.get_node(ua.ObjectIds.FileDirectoryType), target], path)
726
727 def test_get_endpoints(self):
728 endpoints = self.opc.get_endpoints()

Callers

nothing calls this directly

Calls 4

add_folderMethod · 0.80
get_pathMethod · 0.80
add_objectMethod · 0.45
get_nodeMethod · 0.45

Tested by

no test coverage detected