Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for body (0.14 sec)

  1. tests/test_tutorial/test_request_forms_and_files/test_tutorial001_an_py39.py

        return client
    
    
    @needs_py39
    def test_post_form_no_body(client: TestClient):
        response = client.post("/files/")
        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "missing",
                        "loc": ["body", "file"],
                        "msg": "Field required",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_body_fields/test_tutorial001_an_py39.py

                                {"title": "Tax", "type": "number"}
                            ),
                        },
                    },
                    "Body_update_item_items__item_id__put": {
                        "title": "Body_update_item_items__item_id__put",
                        "required": ["item"],
                        "type": "object",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_body_multiple_params/test_tutorial001_an_py39.py

    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.body_multiple_params.tutorial001_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_post_body_q_bar_content(client: TestClient):
        response = client.put("/items/5?q=bar", json={"name": "Foo", "price": 50.5})
        assert response.status_code == 200
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_request_forms/test_tutorial001_an_py39.py

        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_post_body_form(client: TestClient):
        response = client.post("/login/", data={"username": "Foo", "password": "secret"})
        assert response.status_code == 200
        assert response.json() == {"username": "Foo"}
    
    
    @needs_py39
    def test_post_body_form_no_password(client: TestClient):
        response = client.post("/login/", data={"username": "Foo"})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_request_files/test_tutorial001_an_py39.py

                        "required": ["file"],
                        "type": "object",
                        "properties": {
                            "file": {"title": "File", "type": "string", "format": "binary"}
                        },
                    },
                    "Body_create_file_files__post": {
                        "title": "Body_create_file_files__post",
                        "required": ["file"],
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_extra_data_types/test_tutorial001_an_py39.py

                                                {
                                                    "$ref": "#/components/schemas/Body_read_items_items__item_id__put"
                                                }
                                            ],
                                            "title": "Body",
                                        }
                                    )
                                    | IsDict(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Apr 19 00:11:40 GMT 2024
    - 7K bytes
    - Viewed (0)
Back to top