Fastapi: [QUESTION] Tests for FastAPI applications

Created on 12 Apr 2019  Â·  4Comments  Â·  Source: tiangolo/fastapi

How can I write tests for FastAPI applications? Can you make an example application (best practices) with unit and acceptance tests? (Mock database, test env etc)

question

Most helpful comment

Thanks @euri10 !

@dimuska139 I just added docs on testing here: https://fastapi.tiangolo.com/tutorial/testing/ :tada:

All 4 comments

the documentation, the tests folder in the library itself are pretty good
examples.

Le ven. 12 avr. 2019 à 3:09 PM, dimuska139 notifications@github.com a
écrit :

Description

How can I write tests for FastAPI applications? Can you make an example
application (best practices) with unit and acceptance tests? (Mock
database, test env etc)

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/tiangolo/fastapi/issues/152, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDZPstOWZttK87M_vfbzLTXO1_T7KzKks5vgIVsgaJpZM4csFp2
.

@euri10 Thank you!

Thanks @euri10 !

@dimuska139 I just added docs on testing here: https://fastapi.tiangolo.com/tutorial/testing/ :tada:

As this is now part of the docs, I'll close this issue now. But feel free to add more comments or create new issues.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vnwarrior picture vnwarrior  Â·  3Comments

KoduIsGreat picture KoduIsGreat  Â·  3Comments

scheung38 picture scheung38  Â·  3Comments

zero0nee picture zero0nee  Â·  3Comments

updatatoday picture updatatoday  Â·  3Comments