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

Method test_eventgenerator_customEvent

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

Source from the content-addressed store, hash-verified

380 self.assertEqual(ev.PropertyString, None)
381
382 def test_eventgenerator_customEvent(self):
383 etype = self.opc.create_custom_event_type(2, 'MyEvent', ua.ObjectIds.BaseEventType, [('PropertyNum', ua.VariantType.Int32), ('PropertyString', ua.VariantType.String)])
384
385 evgen = self.opc.get_event_generator(etype, ua.ObjectIds.Server)
386 check_eventgenerator_CustomEvent(self, evgen, etype)
387 check_eventgenerator_SourceServer(self, evgen)
388
389 self.assertEqual(evgen.event.PropertyNum, 0)
390 self.assertEqual(evgen.event.PropertyString, None)
391
392 def test_eventgenerator_double_customEvent(self):
393 event1 = self.opc.create_custom_event_type(3, 'MyEvent1', ua.ObjectIds.BaseEventType, [('PropertyNum', ua.VariantType.Int32), ('PropertyString', ua.VariantType.String)])

Callers

nothing calls this directly

Tested by

no test coverage detected