Search Options

Results per page
Sort
Preferred Languages
Advance

Results 101 - 110 of 586 for mytest (0.06 sec)

  1. tests/test_tutorial/test_dependencies/test_tutorial006_an_py39.py

    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.dependencies.tutorial006_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_get_no_headers(client: TestClient):
        response = client.get("/items/")
        assert response.status_code == 422, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_schema_extra_example/test_tutorial004_an_py39.py

    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.schema_extra_example.tutorial004_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    # Test required and embedded body parameters with no bodies sent
    @needs_py39
    def test_post_body_example(client: TestClient):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_schema_extra_example/test_tutorial004_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.schema_extra_example.tutorial004_py310 import app
    
        client = TestClient(app)
        return client
    
    
    # Test required and embedded body parameters with no bodies sent
    @needs_py310
    def test_post_body_example(client: TestClient):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  4. tests/test_jsonable_encoder.py

        assert jsonable_encoder(data) == {"value": 2}
    
    
    def test_encode_deque_encodes_child_models():
        class Model(BaseModel):
            test: str
    
        dq = deque([Model(test="test")])
    
        assert jsonable_encoder(dq)[0]["test"] == "test"
    
    
    @needs_pydanticv2
    def test_encode_pydantic_undefined():
        data = {"value": Undefined}
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 21:56:59 UTC 2024
    - 9K bytes
    - Viewed (0)
  5. 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)
  6. cmd/erasure-metadata_test.go

    		parity   int
    	}{
    		// More than simple majority consensus
    		mkTest(15, 3, 11),
    		// No simple majority consensus
    		mkTest(15, 3, 7),
    		// Exact simple majority consensus
    		mkTest(15, 3, 8),
    		// More than simple majority consensus
    		mkTest(16, 4, 11),
    		// No simple majority consensus
    		mkTest(16, 4, 8),
    		// Exact simple majority consensus
    		mkTest(16, 4, 9),
    		// non-tiered object require read quorum of EcM
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Jul 25 21:02:50 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_request_form_models/test_tutorial002_an.py

    import pytest
    from fastapi.testclient import TestClient
    
    from tests.utils import needs_pydanticv2
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.request_form_models.tutorial002_an import app
    
        client = TestClient(app)
        return client
    
    
    @needs_pydanticv2
    def test_post_body_form(client: TestClient):
        response = client.post("/login/", data={"username": "Foo", "password": "secret"})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Sep 06 17:31:18 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_request_form_models/test_tutorial002_pv1.py

    import pytest
    from fastapi.testclient import TestClient
    
    from tests.utils import needs_pydanticv1
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.request_form_models.tutorial002_pv1 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_pydanticv1
    def test_post_body_form(client: TestClient):
        response = client.post("/login/", data={"username": "Foo", "password": "secret"})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Sep 06 17:31:18 UTC 2024
    - 6K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top