def test_getAllInstruments_NotEstablished(self): gwy = BinanceGwy() with self.assertRaises(InvalidSessionError) as cm: insts = gwy.getAllInstruments() self.assertEqual(cm.exception.msg, 'Session not established')
def test_getAllInstruments(self): gwy = BinanceGwy() gwy.establishSession() insts = gwy.getAllInstruments() self.assertTrue(len(insts) > 0)