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

Method test_unicode_string_nodeid

tests/tests_unit.py:457–466  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

455 self.assertEqual(nid.NodeIdType, ua.NodeIdType.String)
456
457 def test_unicode_string_nodeid(self):
458 nid = ua.NodeId('hëllò', 1)
459 self.assertEqual(nid.NamespaceIndex, 1)
460 self.assertEqual(nid.Identifier, 'hëllò')
461 self.assertEqual(nid.NodeIdType, ua.NodeIdType.String)
462 d = nodeid_to_binary(nid)
463 new_nid = nodeid_from_binary(io.BytesIO(d))
464 self.assertEqual(new_nid, nid)
465 self.assertEqual(new_nid.Identifier, 'hëllò')
466 self.assertEqual(new_nid.NodeIdType, ua.NodeIdType.String)
467
468 def test_numeric_nodeid(self):
469 nid = ua.NodeId(999, 2)

Callers

nothing calls this directly

Calls 2

nodeid_to_binaryFunction · 0.90
nodeid_from_binaryFunction · 0.90

Tested by

no test coverage detected