mirror of https://github.com/tiangolo/fastapi.git
450 B
450 B
Test Client - TestClient
You can use the TestClient class to test FastAPI applications without creating an actual HTTP and socket connection, just communicating directly with the FastAPI code.
Read more about it in the FastAPI docs for Testing.
You can import it directly from fastapi.testclient:
from fastapi.testclient import TestClient
::: fastapi.testclient.TestClient