8000 📝 Update includes in `docs/en/docs/advanced/testing-dependencies.md` by AyushSinghal1794 · Pull Request #12647 · fastapi/fastapi · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update includes in docs/en/docs/advanced /testing-dependencies.md
Update code block formatting in testing-dependencies.md
  • Loading branch information
AyushSinghal1794 authored Oct 28, 2024
commit 0bf8e219b79a27ef64a5d722f375d91a695ae518
52 changes: 1 addition & 51 deletions docs/en/docs/advanced/testing-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,57 +28,7 @@ To override a dependency for testing, you put as a key the original dependency (

And then **FastAPI** will call that override instead of the original dependency.

//// tab | Python 3.10+

```Python hl_lines="26-27 30"
{!> ../../docs_src/dependency_testing/tutorial001_an_py310.py!}
```

////

//// tab | Python 3.9+

```Python hl_lines="28-29 32"
{!> ../../docs_src/dependency_testing/tutorial001_an_py39.py!}
```

////

//// tab | Python 3.8+

```Python hl_lines="29-30 33"
{!> ../../docs_src/dependency_testing/tutorial001_an.py!}
```

////

//// tab | Python 3.10+ non-Annotated

/// tip

Prefer to use the `Annotated` version if possible.

///

```Python hl_lines="24-25 28"
{!> ../../docs_src/dependency_testing/tutorial001_py310.py!}
```

////

//// tab | Python 3.8+ non-Annotated

/// tip

Prefer to use the `Annotated` version if possible.

///

```Python hl_lines="28-29 32"
{!> ../../docs_src/dependency_testing/tutorial001.py!}
```

////
{* ../../docs_src/dependency_testing/tutorial001_an_py310.py hl[26:27,30] *}

/// tip

Expand Down
0