コード例 #1
0
ファイル: test_binance_gateway.py プロジェクト: HogRoast/TVS
 def test_getInstruments_NoAccount(self):
     gwy = BinanceGwy()
     gwy.establishSession()
     with self.assertRaises(InvalidAccountError) as cm:
         insts = gwy.getInstruments('NoSuchAccount')
     self.assertEqual(cm.exception.msg,
                      'Account - NoSuchAccount - does not exist')
コード例 #2
0
ファイル: test_binance_gateway.py プロジェクト: HogRoast/TVS
 def test_getInstruments_NotEstablished(self):
     gwy = BinanceGwy()
     with self.assertRaises(InvalidSessionError) as cm:
         insts = gwy.getInstruments('accountId_example')
     self.assertEqual(cm.exception.msg, 'Session not established')
コード例 #3
0
ファイル: test_binance_gateway.py プロジェクト: HogRoast/TVS
 def test_getInstruments(self):
     gwy = BinanceGwy()
     gwy.establishSession()
     insts = gwy.getInstruments('accountId_example')
     self.assertTrue(len(insts) > 0)