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) float | ErrorResponse ο
Sends a POST request to the Pv Action endpoint.
- Parameters:
pv_action (PvActionRequest) β The PvActionRequest object containing the data for the request.
- Raises:
ValueError β If the response code is not 200 or 400.
- Returns:
The start time of the request if successful, or an ErrorResponse object if there was an error.
- Return type:
float | ErrorResponse
- 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: