class TestAccountEndpoint(unittest.TestCase): def setUp(self): access_key = os.environ['ACCESS_KEY'] secret_key = os.environ['SECRET_KEY'] self.client = HuobiRestClient(access_key=access_key, secret_key=secret_key) def tearDown(self): self.client.close()
def test_invalid_url(self): client = HuobiRestClient(access_key="1", secret_key="1", base_url='https://api.huobi.jfkdlsajfdklsa') with self.assertRaises(HuobiRestRequestError): client.market_history_kline(symbol="btcusdt", period="1day", size=2) client.close()
def setUp(self): self.client = HuobiRestClient()
class TestMarketDataEndpoint(unittest.TestCase): def setUp(self): self.client = HuobiRestClient() def tearDown(self): self.client.close()
def setUp(self): access_key = os.environ['ACCESS_KEY'] secret_key = os.environ['SECRET_KEY'] self.client = HuobiRestClient(access_key=access_key, secret_key=secret_key)