diff --git a/devices/integration_test/client/test_sdptr_sim.py b/devices/integration_test/client/test_sdptr_sim.py index 3ba48e7d761c7ef366c8690e2d114c773de7311d..0ee898ad7cf4dd6966a1cd0f86a94e9626ea3ae9 100644 --- a/devices/integration_test/client/test_sdptr_sim.py +++ b/devices/integration_test/client/test_sdptr_sim.py @@ -7,26 +7,26 @@ # Distributed under the terms of the APACHE license. # See LICENSE.txt for more info. -from opcua import Client +from asyncua import Client from integration_test import base -class TestSDPTRSim(base.IntegrationTestCase): +class TestSDPTRSim(base.IntegrationAsyncTestCase): def setUp(self): super(TestSDPTRSim, self).setUp() - def test_opcua_connection(self): + async def test_opcua_connection(self): """Check if we can connect to sdptr-sim""" client = Client("opc.tcp://sdptr-sim:4840") root_node = None try: - client.connect() - root_node = client.get_root_node() + await client.connect() + root_node = await client.get_root_node() finally: - client.disconnect() + await client.disconnect() self.assertNotEqual(None, root_node) diff --git a/devices/integration_test/client/test_unb2_sim.py b/devices/integration_test/client/test_unb2_sim.py index 227e031e3651fdc1c0523e103b072762271b647a..0587a25097b00ac2cfc567e6e46f450ccb290ad9 100644 --- a/devices/integration_test/client/test_unb2_sim.py +++ b/devices/integration_test/client/test_unb2_sim.py @@ -7,27 +7,27 @@ # Distributed under the terms of the APACHE license. # See LICENSE.txt for more info. -from opcua import Client +from asyncua import Client from integration_test import base -class TestUNB2Sim(base.IntegrationTestCase): +class TestUNB2Sim(base.IntegrationAsyncTestCase): def setUp(self): super(TestUNB2Sim, self).setUp() - def test_opcua_connection(self): + async def test_opcua_connection(self): """Check if we can connect to unb2-sim""" client = Client("opc.tcp://unb2-sim:4844") root_node = None - client.connect() + await client.connect() try: - root_node = client.get_root_node() + root_node = await client.get_root_node() finally: - client.disconnect() + await client.disconnect() self.assertNotEqual(None, root_node)