Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for 18 (0.39 sec)

  1. docs/en/docs/tutorial/testing.md

    Use the `TestClient` object the same way as you do with `httpx`.
    
    Write simple `assert` statements with the standard Python expressions that you need to check (again, standard `pytest`).
    
    ```Python hl_lines="2  12  15-18"
    {!../../../docs_src/app_testing/tutorial001.py!}
    ```
    
    !!! tip
        Notice that the testing functions are normal `def`, not `async def`.
    
        And the calls to the client are also normal calls, not using `await`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  2. docs/de/docs/tutorial/testing.md

    Verwenden Sie das `TestClient`-Objekt auf die gleiche Weise wie `httpx`.
    
    Schreiben Sie einfache `assert`-Anweisungen mit den Standard-Python-Ausdrücken, die Sie überprüfen müssen (wiederum, Standard-`pytest`).
    
    ```Python hl_lines="2  12  15-18"
    {!../../../docs_src/app_testing/tutorial001.py!}
    ```
    
    !!! tip "Tipp"
        Beachten Sie, dass die Testfunktionen normal `def` und nicht `async def` sind.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:20:01 GMT 2024
    - 7K bytes
    - Viewed (0)
  3. docs/ru/docs/tutorial/testing.md

    Используйте объект `TestClient` так же, как Вы используете `httpx`.
    
    Напишите простое утверждение с `assert` дабы проверить истинность Python-выражения (это тоже стандарт `pytest`).
    
    ```Python hl_lines="2  12  15-18"
    {!../../../docs_src/app_testing/tutorial001.py!}
    ```
    
    !!! tip "Подсказка"
        Обратите внимание, что тестирующая функция является обычной `def`, а не асинхронной `async def`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  4. docs/em/docs/tutorial/testing.md

    ✍ 🔢 ⏮️ 📛 👈 ▶️ ⏮️ `test_` (👉 🐩 `pytest` 🏛).
    
    ⚙️ `TestClient` 🎚 🎏 🌌 👆 ⏮️ `httpx`.
    
    ✍ 🙅 `assert` 📄 ⏮️ 🐩 🐍 🧬 👈 👆 💪 ✅ (🔄, 🐩 `pytest`).
    
    ```Python hl_lines="2  12  15-18"
    {!../../../docs_src/app_testing/tutorial001.py!}
    ```
    
    !!! tip
        👀 👈 🔬 🔢 😐 `def`, 🚫 `async def`.
    
         & 🤙 👩‍💻 😐 🤙, 🚫 ⚙️ `await`.
    
        👉 ✔ 👆 ⚙️ `pytest` 🔗 🍵 🤢.
    
    !!! note "📡 ℹ"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  5. docs/zh/docs/tutorial/testing.md

    通过传入你的**FastAPI**应用创建一个 `TestClient` 。
    
    创建名字以 `test_` 开头的函数(这是标准的 `pytest` 约定)。
    
    像使用 `httpx` 那样使用 `TestClient` 对象。
    
    为你需要检查的地方用标准的Python表达式写个简单的 `assert` 语句(重申,标准的`pytest`)。
    
    ```Python hl_lines="2  12  15-18"
    {!../../../docs_src/app_testing/tutorial001.py!}
    ```
    
    !!! tip "提示"
        注意测试函数是普通的 `def`,不是 `async def`。
    
        还有client的调用也是普通的调用,不是用 `await`。
    
        这让你可以直接使用 `pytest` 而不会遇到麻烦。
    
    !!! note "技术细节"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6K bytes
    - Viewed (0)
Back to top