testframework.clients.ops.tester.modbus_container module

class testframework.clients.ops.tester.modbus_container.HttpVerbs

Bases: object

DELETE = 'DELETE'
GET = 'GET'
POST = 'POST'
PUT = 'PUT'
class testframework.clients.ops.tester.modbus_container.ModbusContainerClient(testbench: TestBench)

Bases: object

A client to interact with the REST API on the Modbus container

Uses the injected base URL to get values. Just works with special modbus container on IoT!

Usage:

Given a testbench with you can create a new OpsClient with ``OpsClient(testbench, 30)`

Example

>>> def test_houseload_load1(self, testbench: TestBench):
>>>    ops_client = OpsClient(testbench, default_timeout=30)
>>>    ops_client.modbus_container.xx
get_all_sensor_names() List[str]
get_all_sensor_values() DatapointValuesHttpResponse
get_sensor_value(sensor_name: GlobalSensorName | MiscDataPointId) DatapointValue
get_sensor_values_by_names(sensor_names: List[GlobalSensorName | MiscDataPointId]) List[DatapointValue]
set_sensor_value(sensor_name: GlobalSensorName | MiscDataPointId, value: float) DatapointValue