The Smart Contracts Tester library is a small Python library that can be used to run any function defined in a Smart Contract. It is designed to be used for unit testing of Smart Contracts.
It provides a similar environment to the one that a Smart Contract will run in once executed in Vault. It also provides a series of mock objects that can be used to define the behaviour of the Vault API a Smart Contract uses.
There are two aspects to the library. Running functions and the types.
Installation
You can download the zipped tester libraries using the links in the table below. See the LICENSE.txt file for licensing information. The tester library versions align with the Contract API versions.
From Contract API version 3.4, Smart Contract Tester library is named contract_tester and will contain two separate modules smart_contract_tester and supervisor_contract_tester.
From Contract API version 3.9, the Contract Tester will contain three separate modules smart_contract_tester, supervisor_contract_tester and contract_module_tester.