Testing
Unit Testing
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
- Parameters
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
Balance Checking
Some basic functions are available for retrieving and comparing balances for accounts involved in tests.
See the examples/amm/amm_test.py
for usage example.
State Checking
TODO :)