- Sort Score
- Num 10 results
- Language All
Results 41 - 50 of 1,458 for BytesX (0.06 seconds)
-
tests/test_request_params/test_header/test_list.py
from typing import Annotated import pytest from dirty_equals import AnyThing, IsOneOf, IsPartialDict from fastapi import FastAPI, Header from fastapi.testclient import TestClient from inline_snapshot import snapshot from pydantic import BaseModel, Field app = FastAPI() # ===================================================================================== # Without aliases @app.get("/required-list-str")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 11.3K bytes - Click Count (0) -
tests/test_request_params/test_header/test_optional_str.py
"in": "header", } ] ) @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.5K bytes - Click Count (0) -
tests/test_request_params/test_header/test_required_str.py
from typing import Annotated import pytest from dirty_equals import AnyThing, IsOneOf, IsPartialDict from fastapi import FastAPI, Header from fastapi.testclient import TestClient from inline_snapshot import snapshot from pydantic import BaseModel, Field app = FastAPI() # ===================================================================================== # Without aliases @app.get("/required-str")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 10.3K bytes - Click Count (0) -
tests/test_tutorial/test_background_tasks/test_tutorial002.py
import importlib import os from pathlib import Path import pytest from fastapi.testclient import TestClient from tests.utils import needs_py310, workdir_lock @pytest.fixture( name="client", params=[ pytest.param("tutorial002_py310", marks=needs_py310), pytest.param("tutorial002_an_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 - 968 bytes - Click Count (0) -
tests/test_request_params/test_cookie/test_optional_str.py
"in": "cookie", } ] ) @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.6K bytes - Click Count (0) -
tests/test_pydantic_v1_error.py
name: str app = FastAPI() with pytest.raises(PydanticV1NotSupportedError): @app.post("/param") def endpoint(data: ParamModelV1): # pragma: no cover return data def test_raises_pydantic_v1_model_in_return_type() -> None: class ReturnModelV1(BaseModel): name: str app = FastAPI() with pytest.raises(PydanticV1NotSupportedError):Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 2.3K bytes - Click Count (0) -
tests/test_tutorial/test_body/test_tutorial002.py
import importlib import pytest from fastapi.testclient import TestClient from inline_snapshot import snapshot from ...utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial002_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.body.{request.param}") client = TestClient(mod.app)
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 5.8K bytes - Click Count (0) -
tests/test_request_params/test_header/test_optional_list.py
} ] ) @pytest.mark.parametrize( "path", ["/optional-list-str", "/model-optional-list-str"], ) def test_optional_list_str_missing(path: str): client = TestClient(app) response = client.get(path) assert response.status_code == 200, response.text assert response.json() == {"p": None} @pytest.mark.parametrize( "path",Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 9.6K bytes - Click Count (0) -
tests/test_request_params/test_body/test_optional_list.py
}, ], } @pytest.mark.parametrize( "path", ["/optional-list-str", "/model-optional-list-str"], ) def test_optional_list_str_missing_empty_dict(path: str): client = TestClient(app) response = client.post(path, json={}) assert response.status_code == 200, response.text assert response.json() == {"p": None} @pytest.mark.parametrize( "path",Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 12.6K bytes - Click Count (0) -
scripts/tests/test_translation_fixer/conftest.py
import shutil import sys from pathlib import Path import pytest from typer.testing import CliRunner skip_on_windows = pytest.mark.skipif( sys.platform == "win32", reason="Skipping on Windows" ) THIS_DIR = Path(__file__).parent.resolve() def pytest_collection_modifyitems(config, items: list[pytest.Item]) -> None: if sys.platform != "win32": return for item in items:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Feb 25 10:37:59 GMT 2026 - 1.3K bytes - Click Count (0)