There are two popular modules for unit test Pythin which are unittest (prebuild with Python package) and pytest

Unit test

Inside the unit test there are several packages such mock

Pytest

For more information about the Pytest, please refer to the link

pytest test_{name of the file}.py

options such verbose to display the percentage of the test coverage

Please refer to the link for more information on the unitest_mock https://docs.python.org/3/library/unittest.mock.html

Most unit test follows this pattern