Search Options

Results per page
Sort
Preferred Languages
Advance

Results 251 - 260 of 601 for pytest (0.03 sec)

  1. tests/test_dependency_class.py

    from collections.abc import AsyncGenerator, Generator
    
    import pytest
    from fastapi import Depends, FastAPI
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    class CallableDependency:
        def __call__(self, value: str) -> str:
            return value
    
    
    class CallableGenDependency:
        def __call__(self, value: str) -> Generator[str, None, None]:
            yield value
    
    
    class AsyncCallableDependency:
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 4.4K bytes
    - Viewed (0)
  2. tests/test_regex_deprecated_body.py

    from typing import Annotated
    
    import pytest
    from fastapi import FastAPI, Form
    from fastapi.exceptions import FastAPIDeprecationWarning
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    from .utils import needs_py310
    
    
    def get_client():
        app = FastAPI()
        with pytest.warns(FastAPIDeprecationWarning):
    
            @app.post("/items/")
            async def read_items(
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 5.2K bytes
    - Viewed (0)
  3. docs/de/docs/project-generation.md

    - 🔒 Sicheres Passwort-Hashing standardmäßig.
    - 🔑 JWT (JSON Web Token)-Token-Authentifizierung.
    - 📫 E-Mail-basierte Passwortwiederherstellung.
    - ✅ Tests mit [Pytest](https://pytest.org).
    - 📞 [Traefik](https://traefik.io) als Reverse-Proxy / Load Balancer.
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 2.2K bytes
    - Viewed (0)
  4. docs/ru/docs/project-generation.md

    - 🐋 [Docker Compose](https://www.docker.com) для разработки и продакшна.
    - 🔒 Безопасное хэширование паролей по умолчанию.
    - 🔑 Аутентификация по JWT‑токенам.
    - 📫 Восстановление пароля по электронной почте.
    - ✅ Тесты с [Pytest](https://pytest.org).
    - 📞 [Traefik](https://traefik.io) в роли обратного прокси / балансировщика нагрузки.
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Thu Dec 11 21:25:03 UTC 2025
    - 3.1K bytes
    - Viewed (0)
  5. tests/test_get_model_definitions_formfeed_escape.py

    import pytest
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    
    @pytest.fixture(name="client")
    def client_fixture() -> TestClient:
        from pydantic import BaseModel
    
        class Address(BaseModel):
            """
            This is a public description of an Address
            \f
            You can't see this part of the docstring, it's private!
            """
    
            line_1: str
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 5.8K bytes
    - Viewed (0)
  6. tests/test_response_model_as_return_annotation.py

    
    def test_response_model_no_annotation_return_invalid_dict():
        with pytest.raises(ResponseValidationError) as excinfo:
            client.get("/response_model-no_annotation-return_invalid_dict")
        assert "missing" in str(excinfo.value)
    
    
    def test_response_model_no_annotation_return_invalid_model():
        with pytest.raises(ResponseValidationError) as excinfo:
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 47.7K bytes
    - Viewed (0)
  7. docs/ko/docs/project-generation.md

        - 🦇 다크 모드 지원.
    - 🐋 [Docker Compose](https://www.docker.com): 개발 환경과 프로덕션(운영).
    - 🔒 기본으로 지원되는 안전한 비밀번호 해싱.
    - 🔑 JWT 토큰 인증.
    - 📫 이메일 기반 비밀번호 복구.
    - ✅ [Pytest]를 이용한 테스트(https://pytest.org).
    - 📞 [Traefik](https://traefik.io): 리버스 프록시 / 로드 밸런서.
    - 🚢 Docker Compose를 이용한 배포 지침: 자동 HTTPS 인증서를 처리하기 위한 프론트엔드 Traefik 프록시 설정 방법을 포함.
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Oct 04 11:16:34 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  8. tests/benchmarks/test_general_performance.py

    
    @pytest.fixture(scope="module")
    def client() -> Iterator[TestClient]:
        with TestClient(app) as client:
            yield client
    
    
    def _bench_get(benchmark, client: TestClient, path: str) -> tuple[int, bytes]:
        warmup = client.get(path)
        assert warmup.status_code == 200
    
        def do_request() -> tuple[int, bytes]:
            response = client.get(path)
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 20:40:26 UTC 2025
    - 11.1K bytes
    - Viewed (0)
  9. tests/test_dependency_wrapped.py

    import inspect
    import sys
    from collections.abc import AsyncGenerator, Generator
    from functools import wraps
    
    import pytest
    from fastapi import Depends, FastAPI
    from fastapi.concurrency import iterate_in_threadpool, run_in_threadpool
    from fastapi.testclient import TestClient
    
    if sys.version_info >= (3, 13):  # pragma: no cover
        from inspect import iscoroutinefunction
    else:  # pragma: no cover
        from asyncio import iscoroutinefunction
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 11.2K bytes
    - Viewed (0)
  10. tests/test_annotated.py

    def test_nested_router():
        app = FastAPI()
    
        router = APIRouter(prefix="/nested")
    
        @router.get("/test")
        async def test(var: Annotated[str, Query()] = "bar"):
            return {"foo": var}
    
        app.include_router(router)
    
        client = TestClient(app)
    
        response = client.get("/nested/test")
        assert response.status_code == 200
        assert response.json() == {"foo": "bar"}
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 9.6K bytes
    - Viewed (0)
Back to top