Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for name (0.19 sec)

  1. tests/test_tutorial/test_additional_status_codes/test_tutorial001_an_py39.py

    
    @needs_py39
    def test_create(client: TestClient):
        response = client.put("/items/red", json={"name": "Chillies"})
        assert response.status_code == 201, response.text
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 737 bytes
    - Viewed (0)
  2. tests/test_tutorial/test_dependencies/test_tutorial001_an_py39.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.dependencies.tutorial001_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    @pytest.mark.parametrize(
        "path,expected_status,expected_response",
        [
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 7.2K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_request_forms_and_files/test_tutorial001_an_py39.py

    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="app")
    def get_app():
        from docs_src.request_forms_and_files.tutorial001_an_py39 import app
    
        return app
    
    
    @pytest.fixture(name="client")
    def get_client(app: FastAPI):
        client = TestClient(app)
        return client
    
    
    @needs_py39
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_cookie_params/test_tutorial001_an_py39.py

                                    # TODO: remove when deprecating Pydantic v1
                                    {"title": "Ads Id", "type": "string"}
                                ),
                                "name": "ads_id",
                                "in": "cookie",
                            }
                        ],
                    }
                }
            },
            "components": {
                "schemas": {
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.1K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_body_fields/test_tutorial001_an_py39.py

            "components": {
                "schemas": {
                    "Item": {
                        "title": "Item",
                        "required": ["name", "price"],
                        "type": "object",
                        "properties": {
                            "name": {"title": "Name", "type": "string"},
                            "description": IsDict(
                                {
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_body_multiple_params/test_tutorial001_an_py39.py

            "components": {
                "schemas": {
                    "Item": {
                        "title": "Item",
                        "required": ["name", "price"],
                        "type": "object",
                        "properties": {
                            "name": {"title": "Name", "type": "string"},
                            "description": IsDict(
                                {
                                    "title": "Description",
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_extra_data_types/test_tutorial001_an_py39.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.extra_data_types.tutorial001_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_extra_types(client: TestClient):
        item_id = "ff97dd87-a4a5-4a12-b412-cde99f33e00e"
        data = {
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Apr 19 00:11:40 GMT 2024
    - 7K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_security/test_tutorial001_an_py39.py

    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.security.tutorial001_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_no_token(client: TestClient):
        response = client.get("/items")
        assert response.status_code == 401, response.text
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_request_files/test_tutorial001_an_py39.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.request_files.tutorial001_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_post_form_no_body(client: TestClient):
        response = client.post("/files/")
    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)
  10. tests/test_tutorial/test_request_forms/test_tutorial001_an_py39.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.request_forms.tutorial001_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_post_body_form(client: TestClient):
        response = client.post("/login/", data={"username": "Foo", "password": "secret"})
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.6K bytes
    - Viewed (0)
Back to top