def test_disconnect(self):
        """Test function `disconnect`."""
        ib_bridge = bridge.IBBridge(host=utils.IB_HOST,
                                    port=utils.IB_PORT,
                                    client_id=utils.IB_CLIENT_ID,
                                    auto_conn=False)
        ib_bridge.connect()
        ib_bridge.disconnect()

        self.assertFalse(ib_bridge.is_connected)
    def test_init_1(self):
        """Test initialisation of `IBBridge`.

        * With auto connect disabled.
        """
        ib_bridge = bridge.IBBridge(host=utils.IB_HOST,
                                    port=utils.IB_PORT,
                                    client_id=utils.IB_CLIENT_ID,
                                    auto_conn=False)

        self.assertFalse(ib_bridge.is_connected)
 def setUpClass(cls):
     cls._bridge = bridge.IBBridge(host=utils.IB_HOST,
                                   port=utils.IB_PORT,
                                   client_id=utils.IB_CLIENT_ID)
 def setUp(self):
     self._bridge = bridge.IBBridge(host=utils.IB_HOST,
                                    port=utils.IB_PORT,
                                    client_id=utils.IB_CLIENT_ID,
                                    auto_conn=False)