Esempio n. 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)
Esempio n. 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)
Esempio n. 3
0
 def setUpClass(cls):
     cls._bridge = bridge.IBBridge(host=utils.IB_HOST,
                                   port=utils.IB_PORT,
                                   client_id=utils.IB_CLIENT_ID)
Esempio n. 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)