
* adjusted utxo space to resemble outputs Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com> * added update_utxoset, removed deprecated test utils Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com> * fixed test_update_utxoset Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com> * removed deprecated query and test cases Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com> * fixed delete_unspent_outputs tests Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com> * moved get_merkget_utxoset_merkle_root to dataaccessor and fixed test cases Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com> * fixed delete_transactions query Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com> * removed deprecated fixtures Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com> * blackified Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com> * added get_outputs_by_owner query and adjusted dataaccessor Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com> * removed fastquery class Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com> * fixed api test case Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com> * fixed TestMultipleInputs Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com> * fixed get_outputs_filtered test cases Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com> * fixed get_spent naming issue Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com> * blackified Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com> * updated changelog and version bump Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com> --------- Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
Planetmint Server Unit Tests
Most of the tests in the tests/
folder are unit tests. For info about how to write and run tests, see the docs about contributing to Planetmint, especially:
- Write Code - Remember to Write Tests
- [Notes on Running a Local Dev Node with Docker Compose](https://docs.planetmint.io/en/latest/contributing/dev-setup-coding-and-contribution-process/run-node-with-docker compose.html), especially
make test
- Notes on Running a Local Dev Node as Processes (and Running All Tests)
Note: There are acceptance tests in the acceptance/
folder (at the same level in the hierarchy as the tests/
folder).
Debugging test cases with VS Code
In order to debug unit tests create a virtual environment and install all necessary dependencies. VS Code should notify you that a new virtual environment is detected and ask if you want to use it as environment (more info: Getting started with Python in VS Code).
Configure the tests in VS Code by going to the Testing
tab and click Confiugre Python Tests
and select pytest
. VS Code should now detect all test cases inside of tests
. Click Debug Tests
to run the tests with the debugger attached. (more info: Python testing in VS Code)
Note: pip install .
will not automatically install the test dependencies. If missing install them manually.