Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 71 - 80 of 1,458 for BytesX (0.16 seconds)

  1. docs/es/docs/tutorial/testing.md

    Está basado en [HTTPX](https://www.python-httpx.org), que a su vez está diseñado basado en Requests, por lo que es muy familiar e intuitivo.
    
    Con él, puedes usar [pytest](https://docs.pytest.org/) directamente con **FastAPI**.
    
    ## Usando `TestClient` { #using-testclient }
    
    /// info | Información
    
    Para usar `TestClient`, primero instala [`httpx`](https://www.python-httpx.org).
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:15:55 GMT 2026
    - 6.1K bytes
    - Click Count (0)
  2. docs/ru/docs/tutorial/testing.md

    Используя эти инструменты, Вы можете напрямую задействовать [pytest](https://docs.pytest.org/) с **FastAPI**.
    
    ## Использование класса `TestClient` { #using-testclient }
    
    /// info | Информация
    
    Для использования класса `TestClient` сначала установите [`httpx`](https://www.python-httpx.org).
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:56:20 GMT 2026
    - 9.5K bytes
    - Click Count (0)
  3. android/guava/src/com/google/common/hash/Fingerprint2011.java

        // loop we keep 56 bytes of state: v, w, x, y, and z.
        long x = load64(bytes, offset);
        long y = load64(bytes, offset + length - 16) ^ K1;
        long z = load64(bytes, offset + length - 56) ^ K0;
        long[] v = new long[2];
        long[] w = new long[2];
        weakHashLength32WithSeeds(bytes, offset + length - 64, length, y, v);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Aug 11 19:31:30 GMT 2025
    - 6.5K bytes
    - Click Count (0)
  4. tests/test_deprecated_responses.py

    import warnings
    
    import pytest
    from fastapi import FastAPI
    from fastapi.exceptions import FastAPIDeprecationWarning
    from fastapi.responses import ORJSONResponse, UJSONResponse
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    
    class Item(BaseModel):
        name: str
        price: float
    
    
    # ORJSON
    
    
    def _make_orjson_app() -> FastAPI:
        with warnings.catch_warnings():
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Feb 22 16:34:59 GMT 2026
    - 2K bytes
    - Click Count (0)
  5. docs/zh-hant/docs/advanced/async-tests.md

    在測試中能使用非同步函式會很有用,例如當你以非同步方式查詢資料庫時。想像你想測試發送請求到 FastAPI 應用,然後在使用非同步資料庫函式庫時,驗證後端是否成功把正確資料寫入資料庫。
    
    來看看怎麼做。
    
    ## pytest.mark.anyio { #pytest-mark-anyio }
    
    若要在測試中呼叫非同步函式,測試函式本身也必須是非同步的。AnyIO 為此提供了一個好用的外掛,讓我們可以標示某些測試函式以非同步方式執行。
    
    ## HTTPX { #httpx }
    
    即使你的 FastAPI 應用使用一般的 `def` 函式而非 `async def`,它在底層仍然是個 `async` 應用。
    
    `TestClient` 在內部做了一些魔法,讓我們能在一般的 `def` 測試函式中,使用標準 pytest 來呼叫非同步的 FastAPI 應用。但當我們在非同步函式中使用它時,這個魔法就不再奏效了。也就是說,當以非同步方式執行測試時,就不能在測試函式內使用 `TestClient`。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 3.5K bytes
    - Click Count (0)
  6. tests/test_request_params/test_body/test_list.py

                    "type": "array",
                },
            },
            "required": ["p"],
            "title": body_model_name,
            "type": "object",
        }
    
    
    @pytest.mark.parametrize("json", [None, {}])
    @pytest.mark.parametrize(
        "path",
        ["/required-list-str", "/model-required-list-str"],
    )
    def test_required_list_str_missing(path: str, json: dict | None):
        client = TestClient(app)
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 11.9K bytes
    - Click Count (0)
  7. tests/test_tutorial/test_additional_responses/test_tutorial002.py

    import importlib
    import os
    import shutil
    
    import pytest
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    from tests.utils import needs_py310, workdir_lock
    
    
    @pytest.fixture(
        name="client",
        params=[
            pytest.param("tutorial002_py310", marks=needs_py310),
        ],
    )
    def get_client(request: pytest.FixtureRequest):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Feb 27 10:53:47 GMT 2026
    - 5.3K bytes
    - Click Count (0)
  8. tests/test_security_scopes_sub_dependency.py

    # Ref: https://github.com/fastapi/fastapi/discussions/6024#discussioncomment-8541913
    
    
    from typing import Annotated
    
    import pytest
    from fastapi import Depends, FastAPI, Security
    from fastapi.security import SecurityScopes
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(name="call_counts")
    def call_counts_fixture():
        return {
            "get_db_session": 0,
            "get_current_user": 0,
            "get_user_me": 0,
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 2.9K bytes
    - Click Count (0)
  9. tests/test_request_params/test_query/test_optional_str.py

                    "in": "query",
                }
            ]
        )
    
    
    @pytest.mark.parametrize(
        "path",
        ["/optional-str", "/model-optional-str"],
    )
    def test_optional_str_missing(path: str):
        client = TestClient(app)
        response = client.get(path)
        assert response.status_code == 200
        assert response.json() == {"p": None}
    
    
    @pytest.mark.parametrize(
        "path",
        ["/optional-str", "/model-optional-str"],
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 8.4K bytes
    - Click Count (0)
  10. docs/de/docs/tutorial/testing.md

    Es basiert auf [HTTPX](https://www.python-httpx.org), welches wiederum auf der Grundlage von Requests konzipiert wurde, es ist also sehr vertraut und intuitiv.
    
    Damit können Sie [pytest](https://docs.pytest.org/) direkt mit **FastAPI** verwenden.
    
    ## `TestClient` verwenden { #using-testclient }
    
    /// info | Info
    
    Um `TestClient` zu verwenden, installieren Sie zunächst [`httpx`](https://www.python-httpx.org).
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:58:09 GMT 2026
    - 6.6K bytes
    - Click Count (0)
Back to Top