Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for Tata (0.21 sec)

  1. tests/test_tutorial/test_request_files/test_tutorial001.py

                        "summary": "Create File",
                        "operationId": "create_file_files__post",
                        "requestBody": {
                            "content": {
                                "multipart/form-data": {
                                    "schema": {
                                        "$ref": "#/components/schemas/Body_create_file_files__post"
                                    }
                                }
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_async_sql_databases/test_tutorial001.py

            assert response.status_code == 200, response.text
            data = response.json()
            assert data["text"] == note["text"]
            assert data["completed"] == note["completed"]
            assert "id" in data
            response = client.get("/notes/")
            assert response.status_code == 200, response.text
            assert data in response.json()
    
    
    def test_openapi_schema(app: FastAPI):
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Wed Oct 18 12:36:40 GMT 2023
    - 6K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_extra_data_types/test_tutorial001.py

    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from docs_src.extra_data_types.tutorial001 import app
    
    client = TestClient(app)
    
    
    def test_extra_types():
        item_id = "ff97dd87-a4a5-4a12-b412-cde99f33e00e"
        data = {
            "start_datetime": "2018-12-22T14:00:00+00:00",
            "end_datetime": "2018-12-24T15:00:00+00:00",
            "repeat_at": "15:30:00",
            "process_after": 300,
        }
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Apr 19 00:11:40 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_body/test_tutorial001.py

            "name": "Foo",
            "description": None,
            "price": 50.5,
            "tax": None,
        }
    
    
    def test_wrong_headers(client: TestClient):
        data = '{"name": "Foo", "price": 50.5}'
        response = client.post(
            "/items/", content=data, headers={"Content-Type": "text/plain"}
        )
        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 14.7K bytes
    - Viewed (4)
  5. tests/test_tutorial/test_websockets/test_tutorial001.py

                message = "Message one"
                websocket.send_text(message)
                data = websocket.receive_text()
                assert data == f"Message text was: {message}"
                message = "Message two"
                websocket.send_text(message)
                data = websocket.receive_text()
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 10 09:08:19 GMT 2020
    - 822 bytes
    - Viewed (0)
  6. tests/test_tutorial/test_request_forms/test_tutorial001.py

        return client
    
    
    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"}
    
    
    def test_post_body_form_no_password(client: TestClient):
        response = client.post("/login/", data={"username": "Foo"})
        assert response.status_code == 422
        assert response.json() == IsDict(
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_custom_request_and_route/test_tutorial001.py

    def test_gzip_request(compress):
        n = 1000
        headers = {}
        body = [1] * n
        data = json.dumps(body).encode()
        if compress:
            data = gzip.compress(data)
            headers["Content-Encoding"] = "gzip"
        headers["Content-Type"] = "application/json"
        response = client.post("/sum", content=data, headers=headers)
        assert response.json() == {"sum": n}
    
    
    def test_request_class():
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sun Nov 13 14:26:09 GMT 2022
    - 886 bytes
    - Viewed (0)
  8. tests/test_tutorial/test_request_forms_and_files/test_tutorial001.py

                        "type": "value_error.missing",
                    },
                ]
            }
        )
    
    
    def test_post_form_no_file(client: TestClient):
        response = client.post("/files/", data={"token": "foo"})
        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "missing",
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 9.8K bytes
    - Viewed (0)
Back to top