Pass all but one test, because sqalchemy messes up

This commit is contained in:
Sam Germain 2021-07-07 00:43:06 -06:00
parent 737a62be52
commit b7b6d87c27
2 changed files with 6 additions and 6 deletions

View File

@ -395,7 +395,7 @@ def short_trade(fee):
def leverage_order(): def leverage_order():
return { return {
'id': '1237', 'id': '1237',
'symbol': 'ETC/BTC', 'symbol': 'DOGE/BTC',
'status': 'closed', 'status': 'closed',
'side': 'buy', 'side': 'buy',
'type': 'limit', 'type': 'limit',
@ -410,7 +410,7 @@ def leverage_order():
def leverage_order_sell(): def leverage_order_sell():
return { return {
'id': '12368', 'id': '12368',
'symbol': 'ETC/BTC', 'symbol': 'DOGE/BTC',
'status': 'closed', 'status': 'closed',
'side': 'sell', 'side': 'sell',
'type': 'limit', 'type': 'limit',
@ -452,7 +452,7 @@ def leverage_trade(fee):
= 0.17524390243902502 = 0.17524390243902502
""" """
trade = Trade( trade = Trade(
pair='ETC/BTC', pair='DOGE/BTC',
stake_amount=15.129, stake_amount=15.129,
amount=615.0, amount=615.0,
leverage=5.0, leverage=5.0,
@ -473,8 +473,8 @@ def leverage_trade(fee):
close_date=datetime.now(tz=timezone.utc), close_date=datetime.now(tz=timezone.utc),
interest_rate=0.0005 interest_rate=0.0005
) )
o = Order.parse_from_ccxt_object(leverage_order(), 'ETC/BTC', 'sell') o = Order.parse_from_ccxt_object(leverage_order(), 'DOGE/BTC', 'sell')
trade.orders.append(o) trade.orders.append(o)
o = Order.parse_from_ccxt_object(leverage_order_sell(), 'ETC/BTC', 'sell') o = Order.parse_from_ccxt_object(leverage_order_sell(), 'DOGE/BTC', 'sell')
trade.orders.append(o) trade.orders.append(o)
return trade return trade

View File

@ -772,5 +772,5 @@ def test_get_best_pair_short(fee):
create_mock_trades_with_leverage(fee) create_mock_trades_with_leverage(fee)
res = Trade.get_best_pair() res = Trade.get_best_pair()
assert len(res) == 2 assert len(res) == 2
assert res[0] == 'ETC/BTC' assert res[0] == 'DOGE/BTC'
assert res[1] == 0.17524390243902502 assert res[1] == 0.17524390243902502