Skip to content

Commit c10f7d4

Browse files
Thilo Cestonarooroulet
authored andcommitted
fix naming in crypto test of class variable
1 parent 64fc22a commit c10f7d4

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

tests/tests_crypto_connect.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,28 +25,28 @@ class TestCryptoConnect(unittest.TestCase):
2525
2626
'''
2727
@classmethod
28-
def setUpClass(self):
28+
def setUpClass(cls):
2929
# start our own server
30-
self.srv_crypto = Server()
31-
self.uri_crypto = 'opc.tcp://127.0.0.1:{0:d}'.format(port_num1)
32-
self.srv_crypto.set_endpoint(self.uri_crypto)
30+
cls.srv_crypto = Server()
31+
cls.uri_crypto = 'opc.tcp://127.0.0.1:{0:d}'.format(port_num1)
32+
cls.srv_crypto.set_endpoint(cls.uri_crypto)
3333
# load server certificate and private key. This enables endpoints
3434
# with signing and encryption.
35-
self.srv_crypto.load_certificate("examples/certificate-example.der")
36-
self.srv_crypto.load_private_key("examples/private-key-example.pem")
37-
self.srv_crypto.start()
35+
cls.srv_crypto.load_certificate("examples/certificate-example.der")
36+
cls.srv_crypto.load_private_key("examples/private-key-example.pem")
37+
cls.srv_crypto.start()
3838

3939
# start a server without crypto
40-
self.srv_no_crypto = Server()
41-
self.uri_no_crypto = 'opc.tcp://127.0.0.1:{0:d}'.format(port_num2)
42-
self.srv_no_crypto.set_endpoint(self.uri_no_crypto)
43-
self.srv_no_crypto.start()
40+
cls.srv_no_crypto = Server()
41+
cls.uri_no_crypto = 'opc.tcp://127.0.0.1:{0:d}'.format(port_num2)
42+
cls.srv_no_crypto.set_endpoint(cls.uri_no_crypto)
43+
cls.srv_no_crypto.start()
4444

4545
@classmethod
46-
def tearDownClass(self):
46+
def tearDownClass(cls):
4747
# stop the server
48-
self.srv_no_crypto.stop()
49-
self.srv_crypto.stop()
48+
cls.srv_no_crypto.stop()
49+
cls.srv_crypto.stop()
5050

5151
def test_nocrypto(self):
5252
clt = Client(self.uri_no_crypto)

0 commit comments

Comments
 (0)