Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 33 for one (0.12 sec)

  1. tests/test_tutorial/test_dependencies/test_tutorial012_an_py39.py

                ]
            }
        )
    
    
    @needs_py39
    def test_get_invalid_one_header_items(client: TestClient):
        response = client.get("/items/", headers={"X-Token": "invalid"})
        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "X-Token header invalid"}
    
    
    @needs_py39
    def test_get_invalid_one_users(client: TestClient):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 8.8K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_dependencies/test_tutorial006_an_py39.py

                        "msg": "field required",
                        "type": "value_error.missing",
                    },
                ]
            }
        )
    
    
    @needs_py39
    def test_get_invalid_one_header(client: TestClient):
        response = client.get("/items/", headers={"X-Token": "invalid"})
        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "X-Token header invalid"}
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  3. fastapi/_compat.py

        if origin is Union or origin is UnionType:
            at_least_one_scalar_sequence = False
            for arg in get_args(annotation):
                if field_annotation_is_scalar_sequence(arg):
                    at_least_one_scalar_sequence = True
                    continue
                elif not field_annotation_is_scalar(arg):
                    return False
            return at_least_one_scalar_sequence
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 22.6K bytes
    - Viewed (0)
  4. fastapi/applications.py

                    list. So, the client should be able to always expect it.
    
                    In this case, there would be two different schemas, one for input and
                    another one for output.
                    """
                ),
            ] = True,
            **extra: Annotated[
                Any,
                Doc(
                    """
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 172.2K bytes
    - Viewed (0)
  5. ci/official/wheel_test/test_import_api_packages.py

            "tensorflow.distribute.coordinator",
            "tensorflow.distribute.experimental.partitioners",
        ]
    
      def test_import_runtime(self):
        """Try to import all packages from api packages file one by one."""
        version = "v2"
        failed_packages = []
    
        logging.info("Try to import packages at runtime...")
        for package_name in self.api_packages_v2:
          # Convert package name to the short version:
    Python
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Sep 13 15:52:07 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  6. tests/test_additional_responses_bad.py

    openapi_schema = {
        "openapi": "3.1.0",
        "info": {"title": "FastAPI", "version": "0.1.0"},
        "paths": {
            "/a": {
                "get": {
                    "responses": {
                        # this is how one would imagine the openapi schema to be
                        # but since the key is not valid, openapi.utils.get_openapi will raise ValueError
                        "hello": {"description": "Not a valid additional response"},
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.1K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_dependencies/test_tutorial012.py

                    },
                ]
            }
        )
    
    
    def test_get_invalid_one_header_items():
        response = client.get("/items/", headers={"X-Token": "invalid"})
        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "X-Token header invalid"}
    
    
    def test_get_invalid_one_users():
        response = client.get("/users/", headers={"X-Token": "invalid"})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  8. fastapi/security/open_id_connect_url.py

                    be `None`.
    
                    This is useful when you want to have optional authentication.
    
                    It is also useful when you want to have authentication that can be
                    provided in one of multiple optional ways (for example, with OpenID
                    Connect or in a cookie).
                    """
                ),
            ] = True,
        ):
            self.model = OpenIdConnectModel(
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_dependencies/test_tutorial006.py

                        "msg": "field required",
                        "type": "value_error.missing",
                    },
                ]
            }
        )
    
    
    def test_get_invalid_one_header():
        response = client.get("/items/", headers={"X-Token": "invalid"})
        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "X-Token header invalid"}
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 5K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_dependencies/test_tutorial006_an.py

                        "msg": "field required",
                        "type": "value_error.missing",
                    },
                ]
            }
        )
    
    
    def test_get_invalid_one_header():
        response = client.get("/items/", headers={"X-Token": "invalid"})
        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "X-Token header invalid"}
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 5K bytes
    - Viewed (0)
Back to top