testframework.utils package
- async testframework.utils.fetch(session: ClientSession, url: str) Any
Fetches data from the specified URL using the provided session.
- Parameters:
session (aiohttp.ClientSession) – The aiohttp client session to use for the request.
url (str) – The URL to fetch data from.
- Returns:
The JSON response from the URL.
- Return type:
dict
- Raises:
aiohttp.ClientError – If there is an error during the request.
- async testframework.utils.fetch_all(urls: list[str]) list[dict[str, Any] | BaseException]
Fetches the content of multiple URLs asynchronously using aiohttp.
- Parameters:
urls (list) – A list of URLs to fetch.
- Returns:
- A list of results from fetching the URLs. Each result can be either the content of the URL
or an exception if an error occurred during the fetch.
- Return type:
list
Submodules
- testframework.utils.async_requests module
- testframework.utils.helper module
- testframework.utils.modbus_utils module
DataType
DecodeError
EncodeError
ModbusFunctionCodesEnum
ModbusFunctionCodesEnum.READ_COILS
ModbusFunctionCodesEnum.READ_DISCRETE_INPUT
ModbusFunctionCodesEnum.READ_HOLDING_REGISTER
ModbusFunctionCodesEnum.READ_INPUT_REGISTER
ModbusFunctionCodesEnum.UNDEFINED
ModbusFunctionCodesEnum.WRITE_MULTIPLE_COILS
ModbusFunctionCodesEnum.WRITE_MULTIPLE_HOLDING_REGISTERS
ModbusFunctionCodesEnum.WRITE_SINGLE_COIL
ModbusFunctionCodesEnum.WRITE_SINGLE_HOLDING_REGISTER
RegisterDefinition
SlaveFailureException
WriteException
convert_string_to_registers()
create_modbus_client()
decode_modbus_response()
get_decoding_function()
get_result_from_client()
int_to_modbus_registers()
read_coils()
read_discrete_inputs()
read_holding_register_multiple_values()
read_holding_register_value()
read_input_registers()
write_multiple_coils()
write_multiple_holding_registers()
write_single_coil()
write_single_holding_register()
- testframework.utils.singleton module