Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 70 for parametrizar (0.06 sec)

  1. tests/test_request_params/test_header/test_optional_list.py

            }
        ]
    
    
    @pytest.mark.parametrize(
        "path",
        ["/optional-list-str", "/model-optional-list-str"],
    )
    def test_optional_list_str_missing(path: str):
        client = TestClient(app)
        response = client.get(path)
        assert response.status_code == 200, response.text
        assert response.json() == {"p": None}
    
    
    @pytest.mark.parametrize(
        "path",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 9.3K bytes
    - Viewed (0)
  2. tests/test_request_params/test_query/test_list.py

        p: list[str]
    
    
    @app.get("/model-required-list-str")
    def read_model_required_list_str(p: Annotated[QueryModelRequiredListStr, Query()]):
        return {"p": p.p}
    
    
    @pytest.mark.parametrize(
        "path",
        ["/required-list-str", "/model-required-list-str"],
    )
    def test_required_list_str_schema(path: str):
        assert app.openapi()["paths"][path]["get"]["parameters"] == [
            {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:31:34 UTC 2025
    - 10.9K bytes
    - Viewed (0)
  3. tests/test_request_params/test_file/test_optional.py

        }
    
    
    @pytest.mark.parametrize(
        "path",
        [
            "/optional-bytes",
            "/optional-uploadfile",
        ],
    )
    def test_optional_missing(path: str):
        client = TestClient(app)
        response = client.post(path)
        assert response.status_code == 200, response.text
        assert response.json() == {"file_size": None}
    
    
    @pytest.mark.parametrize(
        "path",
        [
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 9.7K bytes
    - Viewed (0)
  4. tests/test_request_params/test_form/test_optional_str.py

            "type": "object",
        }
    
    
    @pytest.mark.parametrize(
        "path",
        ["/optional-str", "/model-optional-str"],
    )
    def test_optional_str_missing(path: str):
        client = TestClient(app)
        response = client.post(path)
        assert response.status_code == 200
        assert response.json() == {"p": None}
    
    
    @pytest.mark.parametrize(
        "path",
        ["/optional-str", "/model-optional-str"],
    )
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 8.9K bytes
    - Viewed (0)
  5. tests/test_request_params/test_query/test_optional_list.py

            }
        ]
    
    
    @pytest.mark.parametrize(
        "path",
        ["/optional-list-str", "/model-optional-list-str"],
    )
    def test_optional_list_str_missing(path: str):
        client = TestClient(app)
        response = client.get(path)
        assert response.status_code == 200, response.text
        assert response.json() == {"p": None}
    
    
    @pytest.mark.parametrize(
        "path",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 9.1K bytes
    - Viewed (0)
  6. tests/test_request_params/test_query/test_required_str.py

    class QueryModelRequiredStr(BaseModel):
        p: str
    
    
    @app.get("/model-required-str")
    async def read_model_required_str(p: Annotated[QueryModelRequiredStr, Query()]):
        return {"p": p.p}
    
    
    @pytest.mark.parametrize(
        "path",
        ["/required-str", "/model-required-str"],
    )
    def test_required_str_schema(path: str):
        assert app.openapi()["paths"][path]["get"]["parameters"] == [
            {
                "required": True,
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 9.9K bytes
    - Viewed (0)
  7. tests/test_request_params/test_form/test_required_str.py

        p: str
    
    
    @app.post("/model-required-str", operation_id="model_required_str")
    async def read_model_required_str(p: Annotated[FormModelRequiredStr, Form()]):
        return {"p": p.p}
    
    
    @pytest.mark.parametrize(
        "path",
        ["/required-str", "/model-required-str"],
    )
    def test_required_str_schema(path: str):
        openapi = app.openapi()
        body_model_name = get_body_model_name(openapi, path)
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 10.6K bytes
    - Viewed (0)
  8. tests/test_request_params/test_header/test_list.py

        p: list[str]
    
    
    @app.get("/model-required-list-str")
    def read_model_required_list_str(p: Annotated[HeaderModelRequiredListStr, Header()]):
        return {"p": p.p}
    
    
    @pytest.mark.parametrize(
        "path",
        ["/required-list-str", "/model-required-list-str"],
    )
    def test_required_list_str_schema(path: str):
        assert app.openapi()["paths"][path]["get"]["parameters"] == [
            {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:31:34 UTC 2025
    - 11K bytes
    - Viewed (0)
  9. tests/test_request_params/test_file/test_list.py

    
    @app.post("/list-uploadfile", operation_id="list_uploadfile")
    async def read_list_uploadfile(p: Annotated[list[UploadFile], File()]):
        return {"file_size": [file.size for file in p]}
    
    
    @pytest.mark.parametrize(
        "path",
        [
            "/list-bytes",
            "/list-uploadfile",
        ],
    )
    def test_list_schema(path: str):
        openapi = app.openapi()
        body_model_name = get_body_model_name(openapi, path)
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:31:34 UTC 2025
    - 11.2K bytes
    - Viewed (0)
  10. tests/test_request_params/test_query/test_optional_str.py

                "in": "query",
            }
        ]
    
    
    @pytest.mark.parametrize(
        "path",
        ["/optional-str", "/model-optional-str"],
    )
    def test_optional_str_missing(path: str):
        client = TestClient(app)
        response = client.get(path)
        assert response.status_code == 200
        assert response.json() == {"p": None}
    
    
    @pytest.mark.parametrize(
        "path",
        ["/optional-str", "/model-optional-str"],
    )
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 8.1K bytes
    - Viewed (0)
Back to top