コード例 #1
0
    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)
コード例 #2
0
    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)
コード例 #3
0
 def setUpClass(cls):
     cls._bridge = bridge.IBBridge(host=utils.IB_HOST,
                                   port=utils.IB_PORT,
                                   client_id=utils.IB_CLIENT_ID)
コード例 #4
0
 def setUp(self):
     self._bridge = bridge.IBBridge(host=utils.IB_HOST,
                                    port=utils.IB_PORT,
                                    client_id=utils.IB_CLIENT_ID,
                                    auto_conn=False)