I have a project written in python that I would like to create unit tests on.
This project has a dependency on a database project which is a sort of abstraction layer to data connections.
The issue with this db project is that it's huge! So when I want to run the unit tests as part of a continuous integration pipeline I have to download it each time and install it with pip and all the requirements etc.
Ignoring the refactoring of the project which is to come, and knowing that the unit tests for the main project only concern functions within itself and I will be mocking any database queries:
Is there a way of effectively mocking the imports as I can of course mock the classes from the database project but I will still have the import db_project for example in the code so I will still have to pull this project down surely?
How can I remove these dependencies if it is even possible, knowing I am going to mock any methods that are used anyway?