Skip to content

Commit

Permalink
Fixed class in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
imbeacon committed Nov 21, 2024
1 parent dbbe134 commit bf43af5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/integration/connectors/modbus/test_modbus_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def test_read_input_registers(self):
self._create_connector('modbus_attributes.json')

modbus_client_results = []
attrs = self.connector._ModbusConnector__config['master']['slaves'][0]['attributes']
attrs = self.connector._AsyncModbusConnector__config['master']['slaves'][0]['attributes']
for item in attrs:
modbus_client_results.append(
self.client.read_input_registers(item['address'], item['objectsCount'], slave=1).registers)
Expand All @@ -94,7 +94,7 @@ def test_read_input_registers(self):
def test_read_holding_registers(self):
self._create_connector('modbus_attributes.json')
modbus_client_results = []
attrs = self.connector._ModbusConnector__config['master']['slaves'][0]['attributes']
attrs = self.connector._AsyncModbusConnector__config['master']['slaves'][0]['attributes']
for item in attrs:
modbus_client_results.append(
self.client.read_holding_registers(item['address'], item['objectsCount'], slave=1).registers)
Expand All @@ -113,7 +113,7 @@ def test_read_holding_registers(self):
def test_read_discrete_inputs(self):
self._create_connector('modbus_attributes.json')
modbus_client_results = []
attrs = self.connector._ModbusConnector__config['master']['slaves'][0]['attributes']
attrs = self.connector._AsyncModbusConnector__config['master']['slaves'][0]['attributes']
for item in attrs:
modbus_client_results.append(
self.client.read_discrete_inputs(item['address'], item['objectsCount'], slave=1).bits)
Expand All @@ -131,7 +131,7 @@ def test_read_discrete_inputs(self):
def test_read_coils_inputs(self):
self._create_connector('modbus_attributes.json')
modbus_client_results = []
attrs = self.connector._ModbusConnector__config['master']['slaves'][0]['attributes']
attrs = self.connector._AsyncModbusConnector__config['master']['slaves'][0]['attributes']
for item in attrs:
rc = self.client.read_coils(item['address'], item['objectsCount'], slave=1)
if rc and hasattr(rc, 'bits'):
Expand Down

0 comments on commit bf43af5

Please sign in to comment.