Replace prints with logging module.
Use unittest.mock module instead of mock from pypi.