Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 70 for Kersting (0.18 sec)

  1. docs/zh/docs/advanced/testing-dependencies.md

    对于这些用例,**FastAPI** 应用支持 `app.dependcy_overrides` 属性,该属性就是**字典**。
    
    要在测试时覆盖原有依赖项,这个字典的键应当是原依赖项(函数),值是覆盖依赖项(另一个函数)。
    
    这样一来,**FastAPI** 就会调用覆盖依赖项,不再调用原依赖项。
    
    ```Python hl_lines="26-27  30"
    {!../../../docs_src/dependency_testing/tutorial001.py!}
    ```
    
    !!! tip "提示"
    
        **FastAPI** 应用中的任何位置都可以实现覆盖依赖项。
    
        原依赖项可用于*路径操作函数*、*路径操作装饰器*(不需要返回值时)、`.include_router()` 调用等。
    
        FastAPI 可以覆盖这些位置的依赖项。
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 22:45:53 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  2. docs/em/docs/advanced/testing-dependencies.md

    🔐 🔗 🔬, 👆 🚮 🔑 ⏮️ 🔗 (🔢), & 💲, 👆 🔗 🔐 (➕1️⃣ 🔢).
    
    & ⤴️ **FastAPI** 🔜 🤙 👈 🔐 ↩️ ⏮️ 🔗.
    
    ```Python hl_lines="28-29  32"
    {!../../../docs_src/dependency_testing/tutorial001.py!}
    ```
    
    !!! tip
        👆 💪 ⚒ 🔗 🔐 🔗 ⚙️ 🙆 👆 **FastAPI** 🈸.
    
        ⏮️ 🔗 💪 ⚙️ *➡ 🛠️ 🔢*, *➡ 🛠️ 👨‍🎨* (🕐❔ 👆 🚫 ⚙️ 📨 💲), `.include_router()` 🤙, ♒️.
    
        FastAPI 🔜 💪 🔐 ⚫️.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 1.8K bytes
    - Viewed (0)
  3. docs/em/docs/advanced/testing-database.md

    # 🔬 💽
    
    👆 💪 ⚙️ 🎏 🔗 🔐 ⚪️➡️ [🔬 🔗 ⏮️ 🔐](testing-dependencies.md){.internal-link target=_blank} 📉 💽 🔬.
    
    👆 💪 💚 ⚒ 🆙 🎏 💽 🔬, 💾 💽 ⏮️ 💯, 🏤-🥧 ⚫️ ⏮️ 🔬 💽, ♒️.
    
    👑 💭 ⚫️❔ 🎏 👆 👀 👈 ⏮️ 📃.
    
    ## 🚮 💯 🗄 📱
    
    ➡️ ℹ 🖼 ⚪️➡️ [🗄 (🔗) 💽](../tutorial/sql-databases.md){.internal-link target=_blank} ⚙️ 🔬 💽.
    
    🌐 📱 📟 🎏, 👆 💪 🚶 🔙 👈 📃 ✅ ❔ ⚫️.
    
    🕴 🔀 📥 🆕 🔬 📁.
    
    👆 😐 🔗 `get_db()` 🔜 📨 💽 🎉.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 2.6K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_testing_dependencies/test_tutorial001_an_py39.py

    from ...utils import needs_py39
    
    
    @needs_py39
    def test_override_in_items_run():
        from docs_src.dependency_testing.tutorial001_an_py39 import test_override_in_items
    
        test_override_in_items()
    
    
    @needs_py39
    def test_override_in_items_with_q_run():
        from docs_src.dependency_testing.tutorial001_an_py39 import (
            test_override_in_items_with_q,
        )
    
        test_override_in_items_with_q()
    
    
    @needs_py39
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 2K bytes
    - Viewed (0)
  5. docs/de/docs/advanced/async-tests.md

    ## Beispiel
    
    Betrachten wir als einfaches Beispiel eine Dateistruktur ähnlich der in [Größere Anwendungen](../tutorial/bigger-applications.md){.internal-link target=_blank} und [Testen](../tutorial/testing.md){.internal-link target=_blank}:
    
    ```
    .
    ├── app
    │   ├── __init__.py
    │   ├── main.py
    │   └── test_main.py
    ```
    
    Die Datei `main.py` hätte als Inhalt:
    
    ```Python
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 20:25:57 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  6. docs/em/docs/advanced/async-tests.md

    ## 🖼
    
    🙅 🖼, ➡️ 🤔 📁 📊 🎏 1️⃣ 🔬 [🦏 🈸](../tutorial/bigger-applications.md){.internal-link target=_blank} & [🔬](../tutorial/testing.md){.internal-link target=_blank}:
    
    ```
    .
    ├── app
    │   ├── __init__.py
    │   ├── main.py
    │   └── test_main.py
    ```
    
    📁 `main.py` 🔜 ✔️:
    
    ```Python
    {!../../../docs_src/async_tests/main.py!}
    ```
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 3K bytes
    - Viewed (0)
  7. docs/en/docs/release-notes.md

    * Update docs for testing FastAPI. Include using `POST`, sending JSON, testing headers, etc. New documentation: [Testing](https://fastapi.tiangolo.com/tutorial/testing/#testing-extended-example). PR [#271](https://github.com/tiangolo/fastapi/pull/271).
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Apr 28 00:28:00 GMT 2024
    - 385.5K bytes
    - Viewed (1)
  8. docs/pt/docs/deployment.md

    ### Atualizando as versões FastAPI
    
    Você pode adicionar testes em sua aplicação.
    
    Com o **FastAPI** é muito fácil (graças ao Starlette), verifique a documentação: [Testando](tutorial/testing.md){.internal-link target=_blank}
    
    Após você ter os testes, então você pode fazer o _upgrade_ da versão **FastAPI** para uma mais recente, e ter certeza que todo seu código esteja funcionando corretamente rodando seus testes.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Aug 18 16:16:54 GMT 2022
    - 16.8K bytes
    - Viewed (0)
  9. docs/en/docs/advanced/testing-dependencies.md

    # Testing Dependencies with Overrides
    
    ## Overriding dependencies during testing
    
    There are some scenarios where you might want to override a dependency during testing.
    
    You don't want the original dependency to run (nor any of the sub-dependencies it might have).
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 2.9K bytes
    - Viewed (0)
  10. docs/de/docs/advanced/testing-dependencies.md

        ```Python hl_lines="26-27  30"
        {!> ../../../docs_src/dependency_testing/tutorial001_an_py310.py!}
        ```
    
    === "Python 3.9+"
    
        ```Python hl_lines="28-29  32"
        {!> ../../../docs_src/dependency_testing/tutorial001_an_py39.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="29-30  33"
        {!> ../../../docs_src/dependency_testing/tutorial001_an.py!}
        ```
    
    === "Python 3.10+ nicht annotiert"
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 20:17:32 GMT 2024
    - 3.6K bytes
    - Viewed (0)
Back to top