コード例 #1
0
ファイル: bitfinex_test.py プロジェクト: scottjbarr/bitfinex
class TestTradeClient(unittest.TestCase):
    def setUp(self):
        self.tc = TradeClient(API_KEY, API_SECRET)

    def test_instantiate_tradeclient(self):
        self.assertIsInstance(self.tc, TradeClient)

    def test_get_active_orders_returns_json(self):
        ao = self.tc.active_orders()
        self.assertIsInstance(ao, list)

    def test_get_active_positions_returns_json(self):
        ap = self.tc.active_positions()
        self.assertIsInstance(ap, list)

    def test_get_full_history(self):
        ap = self.tc.active_positions()
        self.assertIsInstance(ap, list)
コード例 #2
0
class TestTradeClient(unittest.TestCase):
    def setUp(self):
        self.tc = TradeClient(API_KEY, API_SECRET)

    def test_instantiate_tradeclient(self):
        self.assertIsInstance(self.tc, TradeClient)

    def test_get_active_orders_returns_json(self):
        ao = self.tc.active_orders()
        self.assertIsInstance(ao, list)

    def test_get_active_positions_returns_json(self):
        ap = self.tc.active_positions()
        self.assertIsInstance(ap, list)

    def test_get_full_history(self):
        ap = self.tc.active_positions()
        self.assertIsInstance(ap, list)