BLD: cleanup and minor adjustments to get_candles() in live mode

This commit is contained in:
Frederic Fortier
2018-01-18 18:06:10 -05:00
parent 821f60897f
commit 439b5404ae
7 changed files with 47 additions and 37 deletions
+2 -2
View File
@@ -15,7 +15,7 @@ log = Logger('test_ccxt')
class TestCCXT(BaseExchangeTestCase):
@classmethod
def setup(self):
exchange_name = 'binance'
exchange_name = 'bitfinex'
auth = get_exchange_auth(exchange_name)
self.exchange = CCXT(
exchange_name=exchange_name,
@@ -58,7 +58,7 @@ class TestCCXT(BaseExchangeTestCase):
def test_get_candles(self):
log.info('retrieving candles')
candles = self.exchange.get_candles(
freq='5T',
freq='30T',
assets=[self.exchange.get_asset('eth_btc')],
bar_count=200,
start_dt=pd.to_datetime('2017-09-01', utc=True)
@@ -85,6 +85,8 @@ class TestSuiteBundle:
df, assets, '{}_{}'.format(freq, source)
)
print('saved {} test results: {}'.format(end_dt, folder))
assert_frame_equal(
right=data['bundle'],
left=data['exchange'],
@@ -102,7 +104,6 @@ class TestSuiteBundle:
with open(os.path.join(folder, 'compare.txt'), 'w+') as handle:
handle.write(e.args[0])
print('saved test results: {}'.format(folder))
pass
def test_validate_bundles(self):
@@ -116,7 +117,7 @@ class TestSuiteBundle:
# population=exchange_population,
# features=[bundle],
# ) # Type: list[Exchange]
exchanges = [get_exchange('poloniex', skip_init=True)]
exchanges = [get_exchange('bitfinex', skip_init=True)]
data_portal = TestSuiteBundle.get_data_portal(exchanges)
for exchange in exchanges: