Search Options

Results per page
Sort
Preferred Languages
Advance

Results 131 - 140 of 656 for pytest (0.07 sec)

  1. 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)
  2. tests/test_tutorial/test_dependencies/test_tutorial004.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from docs_src.dependencies.tutorial004 import app
    
    client = TestClient(app)
    
    
    @pytest.mark.parametrize(
        "path,expected_status,expected_response",
        [
            (
                "/items",
                200,
                {
                    "items": [
                        {"item_name": "Foo"},
                        {"item_name": "Bar"},
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 5.4K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_dependencies/test_tutorial004_an.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from docs_src.dependencies.tutorial004_an import app
    
    client = TestClient(app)
    
    
    @pytest.mark.parametrize(
        "path,expected_status,expected_response",
        [
            (
                "/items",
                200,
                {
                    "items": [
                        {"item_name": "Foo"},
                        {"item_name": "Bar"},
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 5.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. tests/test_dependency_normal_exceptions.py

    import pytest
    from fastapi import Body, Depends, FastAPI, HTTPException
    from fastapi.testclient import TestClient
    
    initial_fake_database = {"rick": "Rick Sanchez"}
    
    fake_database = initial_fake_database.copy()
    
    initial_state = {"except": False, "finally": False}
    
    state = initial_state.copy()
    
    app = FastAPI()
    
    
    async def get_database():
        temp_database = fake_database.copy()
        try:
            yield temp_database
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_body_multiple_params/test_tutorial001.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.body_multiple_params.tutorial001 import app
    
        client = TestClient(app)
        return client
    
    
    def test_post_body_q_bar_content(client: TestClient):
        response = client.put("/items/5?q=bar", json={"name": "Foo", "price": 50.5})
        assert response.status_code == 200
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_body_multiple_params/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_multiple_params.tutorial001_an_py310 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py310
    def test_post_body_q_bar_content(client: TestClient):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_request_form_models/test_tutorial002_pv1_an_p39.py

    import pytest
    from fastapi.testclient import TestClient
    
    from tests.utils import needs_py39, needs_pydanticv1
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.request_form_models.tutorial002_pv1_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    # TODO: remove when deprecating Pydantic v1
    @needs_pydanticv1
    @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.5K bytes
    - Viewed (0)
Back to top