testframework.clients.ops.tester.tester_client_recorded module
A class representing the tester part for the recorded Ops Client.
This class extends the OpsClient class and adds an annotation write to action methods.
- class testframework.clients.ops.tester.tester_client_recorded.OpsClientRecorded(tb: TestBench, default_timeout: int)
Bases:
OpsClient
A class representing the tester for the Ops Client.
This class extends the OpsClient class and adds a annotation write to action methods so it’s called recorded version of ops client
This client will only work correctly if the testbench contains a testbrain. :raises AssertionError: If there is no Testbrain on the bench.
- Parameters:
default_timeout (int) – time in seconds before timing out api calls
tb – (TestBench): TestBench Inventory Model
- ensure_influx_connection()
Checks if the influx connection works
Will raise an exception if connection couldn’t be established
- post_pv_action(pv_action: PvActionRequest, timeout: int | None = None) float
Sends a POST request to the Pv Action endpoint.
- Parameters:
pv_action (PvActionRequest) – The PvActionRequest object containing the data for the request.
timeout (int) – An optional override for the request timeout. If not provided the default client timeout is used
- Raises:
ValueError – If the response code is not in the 200 success code range.
- Returns:
The start time of the request.
- Return type:
float
- put_grid_control_lpc(data: LoadLimitRequest) GridControlResponse
Puts Limit Power Consumption to operation container.
- Parameters:
data (LoadLimitRequest) – The data containing the load limit request.
- Raises:
ValidationError – if failed to parse response from API.
- Returns:
The response from the operation container.
- Return type:
- put_grid_control_lpp(data: LoadLimitRequest) GridControlResponse
Puts Limit Power Production to operation container.
- Parameters:
data (LoadLimitRequest) – The data containing the load limit request.
- Raises:
ValidationError – If failed to parse response from API
- Returns:
The response from the operation container.
- Return type: