This post explains how to mock your API dependencies while testing. While creating routes in fastapi, we usually add dependencies for various reasons. To name a few, decoding a jwt token or parsing a…