Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for batch (0.02 sec)

  1. fastapi/routing.py

                    embed_body_fields=self._embed_body_fields,
                )
            )
    
        def matches(self, scope: Scope) -> tuple[Match, Scope]:
            match, child_scope = super().matches(scope)
            if match != Match.NONE:
                child_scope["route"] = self
            return match, child_scope
    
    
    class APIRoute(routing.Route):
        def __init__(
            self,
            path: str,
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 174.6K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_query_params_str_validations/test_tutorial010.py

        assert response.json() == {
            "detail": [
                {
                    "type": "string_pattern_mismatch",
                    "loc": ["query", "item-query"],
                    "msg": "String should match pattern '^fixedquery$'",
                    "input": "nonregexquery",
                    "ctx": {"pattern": "^fixedquery$"},
                }
            ]
        }
    
    
    def test_openapi_schema(client: TestClient):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 5.8K bytes
    - Viewed (0)
  3. tests/test_extra_routes.py

        return JSONResponse(None, headers={"x-fastapi-item-id": item_id})
    
    
    @app.options("/items/{item_id}")
    def options_item(item_id: str):
        return JSONResponse(None, headers={"x-fastapi-item-id": item_id})
    
    
    @app.patch("/items/{item_id}")
    def patch_item(item_id: str, item: Item):
        return {"item_id": item_id, "item": item}
    
    
    @app.trace("/items/{item_id}")
    def trace_item(item_id: str):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 13.5K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_sql_databases/test_tutorial002.py

            assert response.json() == snapshot(
                [{"name": "Spider-Boy", "age": 18, "id": IsInt()}]
            )
    
            # Update a hero
            response = client.patch(
                f"/heroes/{hero_id}", json={"name": "Dog Pond", "age": None}
            )
            assert response.status_code == 200, response.text
            assert response.json() == snapshot(
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 17.9K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_body/test_tutorial001.py

    import importlib
    from unittest.mock import patch
    
    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(
        name="client",
        params=[
            "tutorial001_py39",
            pytest.param("tutorial001_py310", marks=needs_py310),
        ],
    )
    def get_client(request: pytest.FixtureRequest):
        mod = importlib.import_module(f"docs_src.body.{request.param}")
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 10.6K bytes
    - Viewed (0)
  6. tests/test_regex_deprecated_params.py

        assert response.json() == {
            "detail": [
                {
                    "type": "string_pattern_mismatch",
                    "loc": ["query", "q"],
                    "msg": "String should match pattern '^fixedquery$'",
                    "input": "nonregexquery",
                    "ctx": {"pattern": "^fixedquery$"},
                }
            ]
        }
    
    
    @needs_py310
    def test_openapi_schema():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 4.6K bytes
    - Viewed (0)
  7. tests/test_regex_deprecated_body.py

        assert response.json() == {
            "detail": [
                {
                    "type": "string_pattern_mismatch",
                    "loc": ["body", "q"],
                    "msg": "String should match pattern '^fixedquery$'",
                    "input": "nonregexquery",
                    "ctx": {"pattern": "^fixedquery$"},
                }
            ]
        }
    
    
    @needs_py310
    def test_openapi_schema():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 5.2K bytes
    - Viewed (0)
  8. tests/test_security_oauth2.py

        assert response.json() == {
            "detail": [
                {
                    "type": "string_pattern_mismatch",
                    "loc": ["body", "grant_type"],
                    "msg": "String should match pattern '^password$'",
                    "input": grant_type,
                    "ctx": {"pattern": "^password$"},
                }
            ]
        }
    
    
    def test_strict_login_correct_grant_type():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 9K bytes
    - Viewed (0)
  9. tests/test_security_oauth2_optional_description.py

        assert response.json() == {
            "detail": [
                {
                    "type": "string_pattern_mismatch",
                    "loc": ["body", "grant_type"],
                    "msg": "String should match pattern '^password$'",
                    "input": grant_type,
                    "ctx": {"pattern": "^password$"},
                }
            ]
        }
    
    
    def test_strict_login_correct_correct_grant_type():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 9.1K bytes
    - Viewed (0)
  10. tests/test_security_oauth2_optional.py

        assert response.json() == {
            "detail": [
                {
                    "type": "string_pattern_mismatch",
                    "loc": ["body", "grant_type"],
                    "msg": "String should match pattern '^password$'",
                    "input": grant_type,
                    "ctx": {"pattern": "^password$"},
                }
            ]
        }
    
    
    def test_strict_login_correct_data():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 8.9K bytes
    - Viewed (0)
Back to top