Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 45 for Remark (0.26 sec)

  1. tests/utils.py

    import sys
    
    import pytest
    from fastapi._compat import PYDANTIC_V2
    
    needs_py39 = pytest.mark.skipif(sys.version_info < (3, 9), reason="requires python3.9+")
    needs_py310 = pytest.mark.skipif(
        sys.version_info < (3, 10), reason="requires python3.10+"
    )
    needs_pydanticv2 = pytest.mark.skipif(not PYDANTIC_V2, reason="requires Pydantic v2")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 422 bytes
    - Viewed (0)
  2. tests/test_tutorial/test_header_params/test_tutorial001_an.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from docs_src.header_params.tutorial001_an import app
    
    client = TestClient(app)
    
    
    @pytest.mark.parametrize(
        "path,headers,expected_status,expected_response",
        [
            ("/items", None, 200, {"User-Agent": "testclient"}),
            ("/items", {"X-Header": "notvalid"}, 200, {"User-Agent": "testclient"}),
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 3.8K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_cookie_params/test_tutorial001_an_py39.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @needs_py39
    @pytest.mark.parametrize(
        "path,cookies,expected_status,expected_response",
        [
            ("/items", None, 200, {"ads_id": None}),
            ("/items", {"ads_id": "ads_track"}, 200, {"ads_id": "ads_track"}),
            (
                "/items",
                {"ads_id": "ads_track", "session": "cookiesession"},
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.1K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_header_params/test_tutorial003_an_py39.py

    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.header_params.tutorial003_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    @pytest.mark.parametrize(
        "path,headers,expected_status,expected_response",
        [
            ("/items", None, 200, {"X-Token values": None}),
            ("/items", {"x-token": "foo"}, 200, {"X-Token values": ["foo"]}),
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_response_model/test_tutorial004_py39.py

    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.response_model.tutorial004_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    @pytest.mark.parametrize(
        "url,data",
        [
            ("/items/foo", {"name": "Foo", "price": 50.2}),
            (
                "/items/bar",
                {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2},
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Aug 04 20:47:07 GMT 2023
    - 5.2K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_dependencies/test_tutorial004_py310.py

    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.dependencies.tutorial004_py310 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py310
    @pytest.mark.parametrize(
        "path,expected_status,expected_response",
        [
            (
                "/items",
                200,
                {
                    "items": [
                        {"item_name": "Foo"},
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 5.6K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/path-params-numeric-validations.md

        {!> ../../../docs_src/path_params_numeric_validations/tutorial001.py!}
        ```
    
    !!! note
        A path parameter is always required as it has to be part of the path.
    
        So, you should declare it with `...` to mark it as required.
    
        Nevertheless, even if you declared it with `None` or set a default value, it would not affect anything, it would still be always required.
    
    ## Order the parameters as you need
    
    !!! tip
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jan 11 16:31:18 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  8. tests/test_annotated.py

                    "loc": ["query", "foo"],
                    "msg": "ensure this value has at least 1 characters",
                    "type": "value_error.any_str.min_length",
                }
            )
        ]
    }
    
    
    @pytest.mark.parametrize(
        "path,expected_status,expected_response",
        [
            ("/default", 200, {"foo": "foo"}),
            ("/default?foo=bar", 200, {"foo": "bar"}),
            ("/required?foo=bar", 200, {"foo": "bar"}),
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  9. docs/en/docs/how-to/separate-openapi-schemas.md

    The way to describe this in OpenAPI, is to mark that field as **required**, because it will always be there.
    
    Because of that, the JSON Schema for a model can be different depending on if it's used for **input or output**:
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 6.7K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_path_operation_configurations/test_tutorial006.py

    import pytest
    from fastapi.testclient import TestClient
    
    from docs_src.path_operation_configuration.tutorial006 import app
    
    client = TestClient(app)
    
    
    @pytest.mark.parametrize(
        "path,expected_status,expected_response",
        [
            ("/items/", 200, [{"name": "Foo", "price": 42}]),
            ("/users/", 200, [{"username": "johndoe"}]),
            ("/elements/", 200, [{"item_id": "Foo"}]),
        ],
    )
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.3K bytes
    - Viewed (0)
Back to top