Update tests to always provide rate to profit calculations

This commit is contained in:
Matthias
2022-06-17 06:53:40 +00:00
parent 575b4ead1a
commit 76cae8e8e3
3 changed files with 9 additions and 9 deletions

View File

@@ -852,8 +852,8 @@ def test_api_performance(botclient, fee):
close_rate=0.265441,
)
trade.close_profit = trade.calc_profit_ratio()
trade.close_profit_abs = trade.calc_profit()
trade.close_profit = trade.calc_profit_ratio(trade.close_rate)
trade.close_profit_abs = trade.calc_profit(trade.close_rate)
Trade.query.session.add(trade)
trade = Trade(
@@ -868,8 +868,8 @@ def test_api_performance(botclient, fee):
fee_open=fee.return_value,
close_rate=0.391
)
trade.close_profit = trade.calc_profit_ratio()
trade.close_profit_abs = trade.calc_profit()
trade.close_profit = trade.calc_profit_ratio(trade.close_rate)
trade.close_profit_abs = trade.calc_profit(trade.close_rate)
Trade.query.session.add(trade)
Trade.commit()