---
title: "Discussion on \"Make FastAPI testable\" | Hashnode"
description: "Discussion on \"Make FastAPI testable\". Shows how providing \"services\" for depency injection is important for testing and how such services could be easily mocked.\nConsider the following endpoint:\nrouter = APIRouter(\n    prefix=\"/api/v1\"\n)"
url: "https://hashnode.com/posts/make-fastapi-testable/6b021ee0a28ae8f2714b0be9"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Make FastAPI testable](https://olegkleiman.hashnode.dev/make-fastapi-testable?utm_source=hashnode&utm_medium=feed)

Shows how providing "services" for depency injection is important for testing and how such services could be easily mocked. Consider the following endpoint: router = APIRouter( prefix="/api/v1" )

16h ago · 2 min read · olegkleiman.hashnode.dev  
Read the article

## Written by

[Oleg Kleiman](https://hashnode.com/@olegkleiman)

@olegkleiman · Israel

  
[View profile](https://hashnode.com/@olegkleiman)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
