See the tests in lib directory to see different uses of these helpers.
- tests.helpers.assert_output(app: Application, inputs: list[dict[str, Any]], outputs: list[Any], opups: int = 0) None [source]
Creates and calls the UnitTestingApp passed and compares the return value with the expected output
app – An instance of a UnitTestingApp to make call against its unit_test method
inputs – A list of dicts where each entry contains keys matching the input args for the unit_test method and values corresponding to the type expected by the method
outputs – A list of outputs to compare against the return value of the output of the unit_test method
opups – A number of additional app call transactions to make to increase our budget
Some basic functions are available for retrieving and comparing balances for accounts involved in tests.
examples/amm/amm_test.py for usage example.
- tests.helpers.get_balances(client: AlgodClient, accts: list[str]) dict[str, dict[int, int]] [source]
get the balances for all the accounts in the list passed