Total Complexity | 3 |
Total Lines | 18 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | |||
20 | class TestClient(unittest.TestCase): |
||
21 | def setUp(self): |
||
22 | self.server = Server() |
||
23 | url = "opc.tcp://localhost:48400/freeopcua/server/" |
||
24 | self.server.set_endpoint(url) |
||
25 | self.server.start() |
||
26 | self.client = Window() |
||
27 | self.client.ui.addrComboBox.setCurrentText(url) |
||
28 | self.client.connect() |
||
29 | |||
30 | def tearDown(self): |
||
31 | self.client.disconnect() |
||
32 | self.server.stop() |
||
33 | |||
34 | def test_select_objects(self): |
||
35 | objects = self.server.nodes.objects |
||
36 | self.client.tree_ui.set_current_node("Objects") |
||
37 | self.assertEqual(objects, self.client.tree_ui.get_current_node()) |
||
38 | |||
46 |