Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 261 - 270 of 526 for mytest (0.04 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. tests/test_stringified_annotation_dependency.py

    from __future__ import annotations
    
    from typing import TYPE_CHECKING, Annotated
    
    import pytest
    from fastapi import Depends, FastAPI
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    if TYPE_CHECKING:  # pragma: no cover
        from collections.abc import AsyncGenerator
    
    
    class DummyClient:
        async def get_people(self) -> list:
            return ["John Doe", "Jane Doe"]
    
        async def close(self) -> None:
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 2.2K bytes
    - Click Count (0)
  2. tests/test_tutorial/test_custom_docs_ui/test_tutorial001.py

    import os
    from pathlib import Path
    
    import pytest
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(scope="module")
    def client():
        static_dir: Path = Path(os.getcwd()) / "static"
        print(static_dir)
        static_dir.mkdir(exist_ok=True)
        from docs_src.custom_docs_ui.tutorial001_py39 import app
    
        with TestClient(app) as client:
            yield client
        static_dir.rmdir()
    
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 1.3K bytes
    - Click Count (0)
  3. tests/test_route_scope.py

    import pytest
    from fastapi import FastAPI, Request, WebSocket, WebSocketDisconnect
    from fastapi.routing import APIRoute, APIWebSocketRoute
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    @app.get("/users/{user_id}")
    async def get_user(user_id: str, request: Request):
        route: APIRoute = request.scope["route"]
        return {"user_id": user_id, "path": route.path}
    
    
    @app.websocket("/items/{item_id}")
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Mon Sep 29 03:29:38 GMT 2025
    - 1.5K bytes
    - Click Count (0)
  4. 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 ํ”„๋ก์‹œ ์„ค์ • ๋ฐฉ๋ฒ•์„ ํฌํ•จ.
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri Oct 04 11:16:34 GMT 2024
    - 2.1K bytes
    - Click Count (0)
  5. tests/test_tutorial/test_path_params/test_tutorial003.py

    import pytest
    from fastapi.testclient import TestClient
    
    from docs_src.path_params.tutorial003_py39 import app
    
    client = TestClient(app)
    
    
    @pytest.mark.parametrize(
        ("user_id", "expected_response"),
        [
            ("me", {"user_id": "the current user"}),
            ("alice", {"user_id": "alice"}),
        ],
    )
    def test_get_users(user_id: str, expected_response: dict):
        response = client.get(f"/users/{user_id}")
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri Dec 26 10:43:02 GMT 2025
    - 4.6K bytes
    - Click Count (0)
  6. docs/de/docs/index.md

    </p>
    <p align="center">
    <a href="https://github.com/fastapi/fastapi/actions?query=workflow%3ATest+event%3Apush+branch%3Amaster" target="_blank">
        <img src="https://github.com/fastapi/fastapi/actions/workflows/test.yml/badge.svg?event=push&branch=master" alt="Test">
    </a>
    <a href="https://coverage-badge.samuelcolvin.workers.dev/redirect/fastapi/fastapi" target="_blank">
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri Dec 26 09:39:53 GMT 2025
    - 25.8K bytes
    - Click Count (1)
  7. docs/pt/docs/project-generation.md

    - ๐Ÿ‹ [Docker Compose](https://www.docker.com) para desenvolvimento e produรงรฃo.
    - ๐Ÿ”’ _Hash_ seguro de senhas por padrรฃo.
    - ๐Ÿ”‘ Autenticaรงรฃo por token JWT.
    - ๐Ÿ“ซ Recuperaรงรฃo de senhas baseada em email.
    - โœ… Testes com [Pytest](https://pytest.org).
    - ๐Ÿ“ž [Traefik](https://traefik.io) como proxy reverso / balanceador de carga.
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 10:17:03 GMT 2025
    - 2.2K bytes
    - Click Count (0)
  8. 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"}
    
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 18:19:10 GMT 2025
    - 9.6K bytes
    - Click Count (0)
  9. tests/test_dependency_yield_scope_websockets.py

    from contextvars import ContextVar
    from typing import Annotated, Any
    
    import pytest
    from fastapi import Depends, FastAPI, WebSocket
    from fastapi.exceptions import FastAPIError
    from fastapi.testclient import TestClient
    
    global_context: ContextVar[dict[str, Any]] = ContextVar("global_context", default={})  # noqa: B039
    
    
    class Session:
        def __init__(self) -> None:
            self.open = True
    
    
    async def dep_session() -> Any:
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 6K bytes
    - Click Count (0)
  10. misc/ios/go_ios_exec.go

    	bundleID = "golang.gotest"
    
    	exitCode, err := runMain()
    	if err != nil {
    		log.Fatalf("%v\n", err)
    	}
    	os.Exit(exitCode)
    }
    
    func runMain() (int, error) {
    	var err error
    	tmpdir, err = os.MkdirTemp("", "go_ios_exec_")
    	if err != nil {
    		return 1, err
    	}
    	if !debug {
    		defer os.RemoveAll(tmpdir)
    	}
    
    	appdir := filepath.Join(tmpdir, "gotest.app")
    	os.RemoveAll(appdir)
    
    Created: Tue Dec 30 11:13:12 GMT 2025
    - Last Modified: Tue Sep 16 00:34:45 GMT 2025
    - 8.7K bytes
    - Click Count (0)
Back to Top