Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 189 for raisin (0.18 sec)

  1. tests/test_inherited_custom_class.py

        @property  # type: ignore
        def __class__(self):
            return uuid.UUID
    
        @property
        def __dict__(self):
            """Spoof a missing __dict__ by raising TypeError, this is how
            asyncpg.pgroto.pgproto.UUID behaves"""
            raise TypeError("vars() argument must have __dict__ attribute")
    
    
    @needs_pydanticv2
    def test_pydanticv2():
        from pydantic import field_serializer
    
        app = FastAPI()
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 3K bytes
    - Viewed (0)
  2. tests/test_dependency_contextmanager.py

            client.get("/sync_raise_other")
        assert state["/sync_raise"] == "generator raise finalized"
        assert "/sync_raise" not in errors
    
    
    def test_async_raise_raises():
        with pytest.raises(AsyncDependencyError):
            client.get("/async_raise")
        assert state["/async_raise"] == "asyncgen raise finalized"
        assert "/async_raise" in errors
        errors.clear()
    
    
    def test_async_raise_server_error():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/handling-errors.md

    {!../../../docs_src/handling_errors/tutorial001.py!}
    ```
    
    ### Raise an `HTTPException` in your code
    
    `HTTPException` is a normal Python exception with additional data relevant for APIs.
    
    Because it's a Python exception, you don't `return` it, you `raise` it.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_dependencies/test_tutorial008d_an.py

        with pytest.raises(InternalError) as exc_info:
            client.get("/items/portal-gun")
        assert (
            exc_info.value.args[0] == "The portal gun is too dangerous to be owned by Rick"
        )
    
    
    def test_internal_server_error():
        from docs_src.dependencies.tutorial008d_an import app
    
        client = TestClient(app, raise_server_exceptions=False)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 1.2K bytes
    - Viewed (0)
  5. tests/test_empty_router.py

            assert response.status_code == 200, response.text
            assert response.json() == ["OK"]
    
    
    def test_include_empty():
        # if both include and router.path are empty - it should raise exception
        with pytest.raises(FastAPIError):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Jun 11 22:37:34 GMT 2023
    - 805 bytes
    - Viewed (0)
  6. tests/test_additional_responses_bad.py

                    },
                    "summary": "A",
                    "operationId": "a_a_get",
                }
            }
        },
    }
    
    client = TestClient(app)
    
    
    def test_openapi_schema():
        with pytest.raises(ValueError):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.1K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_dependencies/test_tutorial008c.py

    
    def test_fastapi_error(client: TestClient):
        with pytest.raises(FastAPIError) as exc_info:
            client.get("/items/portal-gun")
        assert "No response object was returned" in exc_info.value.args[0]
    
    
    def test_internal_server_error():
        from docs_src.dependencies.tutorial008c import app
    
        client = TestClient(app, raise_server_exceptions=False)
        response = client.get("/items/portal-gun")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_dependencies/test_tutorial008c_an.py

    
    def test_fastapi_error(client: TestClient):
        with pytest.raises(FastAPIError) as exc_info:
            client.get("/items/portal-gun")
        assert "No response object was returned" in exc_info.value.args[0]
    
    
    def test_internal_server_error():
        from docs_src.dependencies.tutorial008c_an import app
    
        client = TestClient(app, raise_server_exceptions=False)
        response = client.get("/items/portal-gun")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_dependencies/test_tutorial008c_an_py39.py

    @needs_py39
    def test_fastapi_error(client: TestClient):
        with pytest.raises(FastAPIError) as exc_info:
            client.get("/items/portal-gun")
        assert "No response object was returned" in exc_info.value.args[0]
    
    
    @needs_py39
    def test_internal_server_error():
        from docs_src.dependencies.tutorial008c_an_py39 import app
    
        client = TestClient(app, raise_server_exceptions=False)
        response = client.get("/items/portal-gun")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 1.2K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_dependencies/test_tutorial008d_an_py39.py

        with pytest.raises(InternalError) as exc_info:
            client.get("/items/portal-gun")
        assert (
            exc_info.value.args[0] == "The portal gun is too dangerous to be owned by Rick"
        )
    
    
    @needs_py39
    def test_internal_server_error():
        from docs_src.dependencies.tutorial008d_an_py39 import app
    
        client = TestClient(app, raise_server_exceptions=False)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 1.3K bytes
    - Viewed (0)
Back to top