Fix some tests
This commit is contained in:
parent
e818797427
commit
e4b7bcaeab
@ -2172,7 +2172,7 @@ def test_handle_trade(
|
|||||||
|
|
||||||
assert trade.close_rate == (2.0 if is_short else 2.2)
|
assert trade.close_rate == (2.0 if is_short else 2.2)
|
||||||
assert pytest.approx(trade.close_profit) == close_profit
|
assert pytest.approx(trade.close_profit) == close_profit
|
||||||
assert trade.calc_profit(trade.close_rate) == 5.685
|
assert pytest.approx(trade.calc_profit(trade.close_rate)) == 5.685
|
||||||
assert trade.close_date is not None
|
assert trade.close_date is not None
|
||||||
assert trade.exit_reason == 'sell_signal1'
|
assert trade.exit_reason == 'sell_signal1'
|
||||||
|
|
||||||
|
@ -263,7 +263,7 @@ def test_dca_buying(default_conf_usdt, ticker_usdt, fee, mocker) -> None:
|
|||||||
assert trade.orders[0].amount == 30
|
assert trade.orders[0].amount == 30
|
||||||
assert trade.orders[1].amount == 60 / ticker_usdt_modif['bid']
|
assert trade.orders[1].amount == 60 / ticker_usdt_modif['bid']
|
||||||
|
|
||||||
assert trade.amount == trade.orders[0].amount + trade.orders[1].amount
|
assert pytest.approx(trade.amount) == trade.orders[0].amount + trade.orders[1].amount
|
||||||
assert trade.nr_of_successful_buys == 2
|
assert trade.nr_of_successful_buys == 2
|
||||||
assert trade.nr_of_successful_entries == 2
|
assert trade.nr_of_successful_entries == 2
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user