# quart.testing.connections module

exception quart.testing.connections.HTTPDisconnectError

  Bases: `Exception`

exception quart.testing.connections.WebsocketDisconnectError

  Bases: `Exception`

exception quart.testing.connections.WebsocketResponseError(response)

  Bases: `Exception`

  Parameters:

    response (Response)

  Return type:

    None

class quart.testing.connections.TestHTTPConnection(app, scope, _preserve_context=False)

  Bases: `object`

  Parameters:

    - app (Quart)

    - scope (HTTPScope)

    - _preserve_context (bool)

  async send(data)
    Parameters:

      data (bytes)

    Return type:

      None

  async send_complete()
    Return type:

      None

  async receive()
    Return type:

      bytes

  async disconnect()
    Return type:

      None

  async as_response()
    Return type:

      Response

class quart.testing.connections.TestWebsocketConnection(app, scope)

  Bases: `object`

  Parameters:

    - app (Quart)

    - scope (WebsocketScope)

  async receive()
    Return type:

      AnyStr

  async send(data)
    Parameters:

      data (AnyStr)

    Return type:

      None

  async receive_json()
    Return type:

      Any

  async send_json(data)
    Parameters:

      data (Any)

    Return type:

      None

  async close(code)
    Parameters:

      code (int)

    Return type:

      None

  async disconnect()
    Return type:

      None