Search Options

Results per page
Sort
Preferred Languages
Advance

Results 101 - 110 of 1,107 for asset1 (0.14 sec)

  1. tests/test_security_http_bearer_description.py

        response = client.get("/users/me", headers={"Authorization": "Bearer foobar"})
        assert response.status_code == 200, response.text
        assert response.json() == {"scheme": "Bearer", "credentials": "foobar"}
    
    
    def test_security_http_bearer_no_credentials():
        response = client.get("/users/me")
        assert response.status_code == 403, response.text
        assert response.json() == {"detail": "Not authenticated"}
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_websockets/test_tutorial002_an_py39.py

                data = websocket.receive_text()
                assert data == f"Message text was: {message}, for item ID: bar"
                message = "Message two"
                websocket.send_text(message)
                data = websocket.receive_text()
                assert data == "Session cookie or query token value is: some-token"
                data = websocket.receive_text()
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_dependencies/test_tutorial008c_an_py39.py

        response = client.get("/items/foo")
        assert response.status_code == 404, response.text
        assert response.json() == {"detail": "Item not found, there's only a plumbus here"}
    
    
    @needs_py39
    def test_get(client: TestClient):
        response = client.get("/items/plumbus")
        assert response.status_code == 200, response.text
        assert response.json() == "plumbus"
    
    
    @needs_py39
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  4. tests/test_required_noneable.py

        response = client.get("/query")
        assert response.status_code == 422
    
    
    def test_required_noneable_query_value():
        response = client.get("/query", params={"q": "foo"})
        assert response.status_code == 200
        assert response.json() == "foo"
    
    
    def test_required_nonable_explicit_query_invalid():
        response = client.get("/explicit-query")
        assert response.status_code == 422
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 19:08:31 UTC 2022
    - 1.5K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_request_files/test_tutorial001_02_an_py39.py

        response = client.post("/files/")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "No file sent"}
    
    
    @needs_py39
    def test_post_uploadfile_no_body(client: TestClient):
        response = client.post("/uploadfile/")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "No upload file sent"}
    
    
    @needs_py39
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 8.5K bytes
    - Viewed (0)
  6. tests/test_starlette_exception.py

    def test_get_item():
        response = client.get("/items/foo")
        assert response.status_code == 200, response.text
        assert response.json() == {"item": "The Foo Wrestlers"}
    
    
    def test_get_item_not_found():
        response = client.get("/items/bar")
        assert response.status_code == 404, response.text
        assert response.headers.get("x-error") == "Some custom header"
        assert response.json() == {"detail": "Item not found"}
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 7.4K bytes
    - Viewed (0)
  7. tests/test_response_by_alias.py

        response = client.get("/dict")
        assert response.status_code == 200, response.text
        assert response.json() == {"name": "Foo"}
    
    
    def test_read_model():
        response = client.get("/model")
        assert response.status_code == 200, response.text
        assert response.json() == {"name": "Foo"}
    
    
    def test_read_list():
        response = client.get("/list")
        assert response.status_code == 200, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 11.1K bytes
    - Viewed (0)
  8. fastapi/openapi/docs.py

        Read more about it in the
        [FastAPI docs for Configure Swagger UI](https://fastapi.tiangolo.com/how-to/configure-swagger-ui/)
        and the [FastAPI docs for Custom Docs UI Static Assets (Self-Hosting)](https://fastapi.tiangolo.com/how-to/custom-docs-ui-assets/).
        """
        current_swagger_ui_parameters = swagger_ui_default_parameters.copy()
        if swagger_ui_parameters:
            current_swagger_ui_parameters.update(swagger_ui_parameters)
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu May 23 22:59:02 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  9. tests/test_extra_routes.py

        assert response.status_code == 200, response.text
        assert response.json() == {"item_id": "foo", "item": {"name": "Foo", "price": None}}
    
    
    def test_head():
        response = client.head("/items/foo")
        assert response.status_code == 200, response.text
        assert response.headers["x-fastapi-item-id"] == "foo"
    
    
    def test_options():
        response = client.options("/items/foo")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 13.7K bytes
    - Viewed (0)
  10. tests/test_compat.py

            return foo
    
        client = TestClient(app)
    
        response = client.post("/", json="bar")
        assert response.status_code == 200, response.text
        assert response.json() == "bar"
    
        response2 = client.post("/", json=[1, 2])
        assert response2.status_code == 200, response2.text
        assert response2.json() == [1, 2]
    
    
    def test_is_bytes_sequence_annotation_union():
        # For coverage
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Sep 11 07:45:30 UTC 2024
    - 3.5K bytes
    - Viewed (0)
Back to top