Skip to content

Commit

Permalink
docs: added how to
Browse files Browse the repository at this point in the history
  • Loading branch information
iudeen committed Dec 26, 2024
1 parent 8dafc31 commit 2380df4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/testclient.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ case you should use `client = TestClient(app, raise_server_exceptions=False)`.
not be triggered when the `TestClient` is instantiated. You can learn more about it
[here](lifespan.md#running-lifespan-in-tests).

!!! note

By default the `TestClient` uses `testclient:50000` as the host and port.
To use a different client, you can pass the host and port as a tuple: `TestClient(client=(<host>, <port>)`.

### Selecting the Async backend

`TestClient` takes arguments `backend` (a string) and `backend_options` (a dictionary).
Expand Down

0 comments on commit 2380df4

Please sign in to comment.