Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 169 for IsDict (0.35 sec)

  1. tests/test_tutorial/test_body_multiple_params/test_tutorial001.py

        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "int_parsing",
                        "loc": ["path", "item_id"],
                        "msg": "Input should be a valid integer, unable to parse string as an integer",
                        "input": "foo",
                    }
                ]
            }
        ) | 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)
  2. tests/test_tutorial/test_body_multiple_params/test_tutorial003_an_py310.py

                            "description": IsDict(
                                {
                                    "title": "Description",
                                    "anyOf": [{"type": "string"}, {"type": "null"}],
                                }
                            )
                            | IsDict(
                                # TODO: remove when deprecating Pydantic v1
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_request_files/test_tutorial001_02_an_py39.py

    from pathlib import Path
    
    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_02_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: Fri Jul 07 17:12:13 GMT 2023
    - 8.5K bytes
    - Viewed (0)
  4. tests/test_security_oauth2.py

        assert response.status_code == 422
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "missing",
                        "loc": ["body", "grant_type"],
                        "msg": "Field required",
                        "input": None,
                    }
                ]
            }
        ) | IsDict(
            # TODO: remove when deprecating Pydantic v1
            {
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 10.7K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_schema_extra_example/test_tutorial005_an_py310.py

                        ],
                        "requestBody": {
                            "content": {
                                "application/json": {
                                    "schema": IsDict({"$ref": "#/components/schemas/Item"})
                                    | IsDict(
                                        # TODO: remove when deprecating Pydantic v1
                                        {
                                            "allOf": [
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Aug 26 18:03:13 GMT 2023
    - 6.8K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_request_forms_and_files/test_tutorial001.py

    import pytest
    from dirty_equals import IsDict
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(name="app")
    def get_app():
        from docs_src.request_forms_and_files.tutorial001 import app
    
        return app
    
    
    @pytest.fixture(name="client")
    def get_client(app: FastAPI):
        client = TestClient(app)
        return client
    
    
    def test_post_form_no_body(client: TestClient):
    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)
  7. tests/test_path.py

        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "int_parsing",
                        "loc": ["path", "item_id"],
                        "msg": "Input should be a valid integer, unable to parse string as an integer",
                        "input": "foobar",
                    }
                ]
            }
        ) | IsDict(
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 34.4K bytes
    - Viewed (0)
  8. tests/test_query.py

    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from .main import app
    
    client = TestClient(app)
    
    
    def test_query():
        response = client.get("/query")
        assert response.status_code == 422
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "missing",
                        "loc": ["query", "query"],
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 11.4K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_body/test_tutorial001.py

        assert response.status_code == 422
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "missing",
                        "loc": ["body", "price"],
                        "msg": "Field required",
                        "input": {"name": "Foo"},
                    }
                ]
            }
        ) | IsDict(
            # TODO: remove when deprecating Pydantic v1
            {
    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)
  10. tests/test_tutorial/test_body/test_tutorial001_py310.py

        assert response.status_code == 422
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "missing",
                        "loc": ["body", "price"],
                        "msg": "Field required",
                        "input": {"name": "Foo"},
                    }
                ]
            }
        ) | IsDict(
            # TODO: remove when deprecating Pydantic v1
            {
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 15K bytes
    - Viewed (1)
Back to top