Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 223 for Maisse (0.17 sec)

  1. tests/test_tutorial/test_websockets/test_tutorial002_an.py

        client = TestClient(app)
        with pytest.raises(WebSocketDisconnect):
            with client.websocket_connect("/items/foo/ws"):
                pytest.fail(
                    "did not raise WebSocketDisconnect on __enter__"
                )  # pragma: no cover
    
    
    def test_websocket_invalid_data():
        client = TestClient(app)
        with pytest.raises(WebSocketDisconnect):
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 3.6K 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 21 07:19:11 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_websockets/test_tutorial002_an_py39.py

        client = TestClient(app)
        with pytest.raises(WebSocketDisconnect):
            with client.websocket_connect("/items/foo/ws"):
                pytest.fail(
                    "did not raise WebSocketDisconnect on __enter__"
                )  # pragma: no cover
    
    
    @needs_py39
    def test_websocket_invalid_data(app: FastAPI):
        client = TestClient(app)
        with pytest.raises(WebSocketDisconnect):
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  4. tests/test_ws_router.py

            try:
                return await call_next()
            except Exception as e:  # pragma: no cover
                caught.append(e)
                raise
    
        myapp = make_app(middleware=[Middleware(catcher)])
    
        client = TestClient(myapp)
        with pytest.raises(WebSocketDisconnect) as e:
            with client.websocket_connect("/depends-validate/"):
                pass  # pragma: no cover
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sun Jun 11 19:08:14 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  5. tests/test_exception_handlers.py

        assert response.json() == {"exception": "request-validation"}
    
    
    def test_override_server_error_exception_raises():
        with pytest.raises(RuntimeError):
            client.get("/server-error")
    
    
    def test_override_server_error_exception_response():
        client = TestClient(app, raise_server_exceptions=False)
        response = client.get("/server-error")
        assert response.status_code == 500
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Feb 17 12:40:12 GMT 2022
    - 1.9K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_websockets/test_tutorial002.py

        client = TestClient(app)
        with pytest.raises(WebSocketDisconnect):
            with client.websocket_connect("/items/foo/ws"):
                pytest.fail(
                    "did not raise WebSocketDisconnect on __enter__"
                )  # pragma: no cover
    
    
    def test_websocket_invalid_data():
        client = TestClient(app)
        with pytest.raises(WebSocketDisconnect):
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sun Nov 13 14:26:09 GMT 2022
    - 3.6K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_websockets/test_tutorial002_py310.py

        client = TestClient(app)
        with pytest.raises(WebSocketDisconnect):
            with client.websocket_connect("/items/foo/ws"):
                pytest.fail(
                    "did not raise WebSocketDisconnect on __enter__"
                )  # pragma: no cover
    
    
    @needs_py310
    def test_websocket_invalid_data(app: FastAPI):
        client = TestClient(app)
        with pytest.raises(WebSocketDisconnect):
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  8. 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 21 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  9. docs/sts/client_grants/sts_element.py

            """Extract text of a child element. If strict, and child element is
            not present, raises InvalidXMLError and otherwise returns
            None.
    
            """
            if strict:
                try:
                    return self.element.find('sts:{}'.format(name), _STS_NS).text
                except _ETREE_EXCEPTIONS as error:
                    raise InvalidXMLError(
                        ('Invalid XML provided for "{}" - erroring tag <{}>. '
    Python
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 23 18:58:53 GMT 2021
    - 2.5K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_websockets/test_tutorial002_an_py310.py

        client = TestClient(app)
        with pytest.raises(WebSocketDisconnect):
            with client.websocket_connect("/items/foo/ws"):
                pytest.fail(
                    "did not raise WebSocketDisconnect on __enter__"
                )  # pragma: no cover
    
    
    @needs_py310
    def test_websocket_invalid_data(app: FastAPI):
        client = TestClient(app)
        with pytest.raises(WebSocketDisconnect):
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 3.9K bytes
    - Viewed (0)
Back to top