Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for remark (0.16 sec)

  1. 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 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_header_params/test_tutorial003.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from docs_src.header_params.tutorial003 import app
    
    client = TestClient(app)
    
    
    @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"]}),
            (
                "/items",
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jan 12 14:52:00 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_header_params/test_tutorial001_an_py310.py

    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.header_params.tutorial001_an_py310 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py310
    @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 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_header_params/test_tutorial002_an.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from docs_src.header_params.tutorial002_an import app
    
    client = TestClient(app)
    
    
    @pytest.mark.parametrize(
        "path,headers,expected_status,expected_response",
        [
            ("/items", None, 200, {"strange_header": None}),
            ("/items", {"X-Header": "notvalid"}, 200, {"strange_header": None}),
            (
                "/items",
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4K bytes
    - Viewed (0)
  5. tests/test_custom_route_class.py

    
    router_b.include_router(router=router_c, prefix="/c")
    router_a.include_router(router=router_b, prefix="/b")
    app.include_router(router=router_a, prefix="/a")
    
    
    client = TestClient(app)
    
    
    @pytest.mark.parametrize(
        "path,expected_status,expected_response",
        [
            ("/a", 200, {"msg": "A"}),
            ("/a/b", 200, {"msg": "B"}),
            ("/a/b/c", 200, {"msg": "C"}),
        ],
    )
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  6. tests/test_dependency_class.py

    async def get_asynchronous_method_gen_dependency(
        value: str = Depends(methods_dependency.asynchronous_gen),
    ):
        return value
    
    
    client = TestClient(app)
    
    
    @pytest.mark.parametrize(
        "route,value",
        [
            ("/callable-dependency", "callable-dependency"),
            ("/callable-gen-dependency", "callable-gen-dependency"),
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sun Aug 09 10:54:05 GMT 2020
    - 3.3K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_header_params/test_tutorial002_py310.py

    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.header_params.tutorial002_py310 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py310
    @pytest.mark.parametrize(
        "path,headers,expected_status,expected_response",
        [
            ("/items", None, 200, {"strange_header": None}),
            ("/items", {"X-Header": "notvalid"}, 200, {"strange_header": None}),
            (
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.2K bytes
    - Viewed (0)
  8. fastapi/param_functions.py

                """
            ),
        ] = None,
        deprecated: Annotated[
            Union[deprecated, str, bool, None],
            Doc(
                """
                Mark this parameter field as deprecated.
    
                It will affect the generated OpenAPI (e.g. visible at `/docs`).
                """
            ),
        ] = None,
        include_in_schema: Annotated[
            bool,
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 62.5K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_dependencies/test_tutorial001_an.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from docs_src.dependencies.tutorial001_an import app
    
    client = TestClient(app)
    
    
    @pytest.mark.parametrize(
        "path,expected_status,expected_response",
        [
            ("/items", 200, {"q": None, "skip": 0, "limit": 100}),
            ("/items?q=foo", 200, {"q": "foo", "skip": 0, "limit": 100}),
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 7.1K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_dependencies/test_tutorial001_an_py39.py

    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.dependencies.tutorial001_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    @pytest.mark.parametrize(
        "path,expected_status,expected_response",
        [
            ("/items", 200, {"q": None, "skip": 0, "limit": 100}),
            ("/items?q=foo", 200, {"q": "foo", "skip": 0, "limit": 100}),
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 7.2K bytes
    - Viewed (0)
Back to top