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

Method runTest

tests/tests_server.py:593–612  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

591
592class TestServerCaching(unittest.TestCase):
593 def runTest(self):
594 return # FIXME broken
595 tmpfile = NamedTemporaryFile()
596 path = tmpfile.name
597 tmpfile.close()
598
599 # create cache file
600 server = Server(shelffile=path)
601
602 # modify cache content
603 id = ua.NodeId(ua.ObjectIds.Server_ServerStatus_SecondsTillShutdown)
604 s = shelve.open(path, "w", writeback=True)
605 s[id.to_string()].attributes[ua.AttributeIds.Value].value = ua.DataValue(123)
606 s.close()
607
608 # ensure that we are actually loading from the cache
609 server = Server(shelffile=path)
610 self.assertEqual(server.get_node(id).get_value(), 123)
611
612 os.remove(path)
613
614
615class TestServerStartError(unittest.TestCase):

Callers

nothing calls this directly

Calls 6

to_stringMethod · 0.95
get_nodeMethod · 0.95
ServerClass · 0.90
openMethod · 0.80
get_valueMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected