Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for simple (0.24 sec)

  1. tests/test_security_http_basic_realm_description.py

        assert response.headers["WWW-Authenticate"] == 'Basic realm="simple"'
    
    
    def test_security_http_basic_invalid_credentials():
        response = client.get(
            "/users/me", headers={"Authorization": "Basic notabase64token"}
        )
        assert response.status_code == 401, response.text
        assert response.headers["WWW-Authenticate"] == 'Basic realm="simple"'
        assert response.json() == {"detail": "Invalid authentication credentials"}
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  2. ci/official/containers/linux_arm64/devel.usertools/squash_testlogs.py

    Recursively find all the JUnit test.xml files in one directory, and merge any
    of them that contain failures into one file. The TensorFlow DevInfra team
    uses this to generate a simple overview of an entire pip and nonpip test
    invocation, since the normal logs that Bazel creates are too large for the
    internal invocation viewer.
    """
    import collections
    import os
    import re
    import subprocess
    Python
    - Registered: Tue May 07 12:40:20 GMT 2024
    - Last Modified: Mon Sep 18 19:00:37 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  3. tests/test_response_model_include_exclude.py

            baz="simple_exclude model2 baz",
        )
    
    
    @app.get(
        "/simple_exclude_dict",
        response_model=Model2,
        response_model_exclude={"ref": {"bar"}},
    )
    def simple_exclude_dict():
        return {
            "ref": {
                "foo": "simple_exclude_dict model foo",
                "bar": "simple_exclude_dict model bar",
            },
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Jul 19 19:14:58 GMT 2021
    - 4K bytes
    - Viewed (0)
  4. tests/test_security_http_basic_realm.py

        assert response.headers["WWW-Authenticate"] == 'Basic realm="simple"'
    
    
    def test_security_http_basic_invalid_credentials():
        response = client.get(
            "/users/me", headers={"Authorization": "Basic notabase64token"}
        )
        assert response.status_code == 401, response.text
        assert response.headers["WWW-Authenticate"] == 'Basic realm="simple"'
        assert response.json() == {"detail": "Invalid authentication credentials"}
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.6K bytes
    - Viewed (0)
  5. tests/test_invalid_path_param.py

            def read_items(id: Dict[str, Item]):
                pass  # pragma: no cover
    
    
    def test_invalid_simple_list():
        with pytest.raises(AssertionError):
            app = FastAPI()
    
            @app.get("/items/{id}")
            def read_items(id: list):
                pass  # pragma: no cover
    
    
    def test_invalid_simple_tuple():
        with pytest.raises(AssertionError):
            app = FastAPI()
    
            @app.get("/items/{id}")
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Jun 03 17:59:40 GMT 2019
    - 1.7K bytes
    - Viewed (0)
  6. tests/test_invalid_sequence_param.py

            class Item(BaseModel):
                title: str
    
            @app.get("/items/")
            def read_items(q: Dict[str, Item] = Query(default=None)):
                pass  # pragma: no cover
    
    
    def test_invalid_simple_dict():
        with pytest.raises(AssertionError):
            app = FastAPI()
    
            class Item(BaseModel):
                title: str
    
            @app.get("/items/")
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 1.2K bytes
    - Viewed (0)
  7. tests/test_inherited_custom_class.py

            return SomeCustomClass(a_uuid=MyUuid("b8799909-f914-42de-91bc-95c819218d01"))
    
        client = TestClient(app)
    
        with client:
            response_simple = client.get("/fast_uuid")
            response_pydantic = client.get("/get_custom_class")
    
        assert response_simple.json() == {
            "fast_uuid": "a10ff360-3b1e-4984-a26f-d3ab460bdb51"
        }
    
        assert response_pydantic.json() == {
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 3K bytes
    - Viewed (0)
  8. docs_src/path_operation_advanced_configuration/tutorial002.py

    
    @app.get("/items/")
    async def read_items():
        return [{"item_id": "Foo"}]
    
    
    def use_route_names_as_operation_ids(app: FastAPI) -> None:
        """
        Simplify operation IDs so that generated API clients have simpler function
        names.
    
        Should be called only after all routes have been added.
        """
        for route in app.routes:
            if isinstance(route, APIRoute):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 572 bytes
    - Viewed (0)
Back to top