Search Options

Results per page
Sort
Preferred Languages
Advance

Results 101 - 110 of 227 for p1_test (0.05 sec)

  1. tests/test_tutorial/test_query_params_str_validations/test_tutorial014_an_py310.py

    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.query_params_str_validations.tutorial014_an_py310 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py310
    def test_hidden_query(client: TestClient):
        response = client.get("/items?hidden_query=somevalue")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_request_files/test_tutorial001_02_an_py39.py

    from pathlib import Path
    
    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.request_files.tutorial001_02_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_post_form_no_body(client: TestClient):
        response = client.post("/files/")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 8.5K bytes
    - Viewed (0)
  3. tests/test_param_include_in_schema.py

    from typing import Optional
    
    import pytest
    from fastapi import Cookie, FastAPI, Header, Path, Query
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    @app.get("/hidden_cookie")
    async def hidden_cookie(
        hidden_cookie: Optional[str] = Cookie(default=None, include_in_schema=False),
    ):
        return {"hidden_cookie": hidden_cookie}
    
    
    @app.get("/hidden_header")
    async def hidden_header(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Mar 26 16:56:53 UTC 2024
    - 7.4K bytes
    - Viewed (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 ν”„λ‘μ‹œ μ„€μ • 방법을 포함.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Oct 04 11:16:34 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_request_form_models/test_tutorial002_an_py39.py

    import pytest
    from fastapi.testclient import TestClient
    
    from tests.utils import needs_py39, needs_pydanticv2
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.request_form_models.tutorial002_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_pydanticv2
    @needs_py39
    def test_post_body_form(client: TestClient):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Sep 06 17:31:18 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_body_fields/test_tutorial001_an_py310.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.body_fields.tutorial001_an_py310 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py310
    def test_items_5(client: TestClient):
        response = client.put("/items/5", json={"item": {"name": "Foo", "price": 3.0}})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  7. docs/em/docs/advanced/async-tests.md

    ```Python
    {!../../docs_src/async_tests/test_main.py!}
    ```
    
    ## πŸƒ ⚫️
    
    πŸ‘† πŸ’ͺ πŸƒ πŸ‘† πŸ’― 🐌 πŸ“¨:
    
    <div class="termy">
    
    ```console
    $ pytest
    
    ---> 100%
    ```
    
    </div>
    
    ## β„Ή
    
    πŸ“‘ `@pytest.mark.anyio` πŸ’¬ ✳ πŸ‘ˆ πŸ‘‰ πŸ’― πŸ”’ πŸ”œ πŸ€™ πŸ”:
    
    ```Python hl_lines="7"
    {!../../docs_src/async_tests/test_main.py!}
    ```
    
    /// tip
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_sql_databases/test_tutorial002.py

        default_registry.dispose()
    
    
    @pytest.fixture(
        name="client",
        params=[
            "tutorial002",
            pytest.param("tutorial002_py39", marks=needs_py39),
            pytest.param("tutorial002_py310", marks=needs_py310),
            "tutorial002_an",
            pytest.param("tutorial002_an_py39", marks=needs_py39),
            pytest.param("tutorial002_an_py310", marks=needs_py310),
        ],
    )
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 19.9K bytes
    - Viewed (0)
  9. scripts/test.sh

    #!/usr/bin/env bash
    
    set -e
    set -x
    
    export PYTHONPATH=./docs_src
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Jun 11 21:38:15 UTC 2023
    - 99 bytes
    - Viewed (0)
  10. tests/test_tutorial/test_request_form_models/test_tutorial001_an.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.request_form_models.tutorial001_an import app
    
        client = TestClient(app)
        return client
    
    
    def test_post_body_form(client: TestClient):
        response = client.post("/login/", data={"username": "Foo", "password": "secret"})
        assert response.status_code == 200
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Sep 05 15:16:50 UTC 2024
    - 7.4K bytes
    - Viewed (0)
Back to top