fix tests
This commit is contained in:
parent
099a03f190
commit
92d1f2b945
@ -239,7 +239,7 @@ def test_rpc_status_table(default_conf, ticker, fee, mocker) -> None:
|
|||||||
rpc._config['position_adjustment_enable'] = True
|
rpc._config['position_adjustment_enable'] = True
|
||||||
rpc._config['max_entry_position_adjustment'] = 3
|
rpc._config['max_entry_position_adjustment'] = 3
|
||||||
result, headers, fiat_profit_sum = rpc._rpc_status_table(default_conf['stake_currency'], 'USD')
|
result, headers, fiat_profit_sum = rpc._rpc_status_table(default_conf['stake_currency'], 'USD')
|
||||||
assert "# Buys" in headers
|
assert "# Entries" in headers
|
||||||
assert len(result[0]) == 5
|
assert len(result[0]) == 5
|
||||||
# 4th column should be 1/4 - as 1 order filled (a total of 4 is possible)
|
# 4th column should be 1/4 - as 1 order filled (a total of 4 is possible)
|
||||||
# 3 on top of the initial one.
|
# 3 on top of the initial one.
|
||||||
|
@ -260,8 +260,8 @@ def test_telegram_status_multi_entry(default_conf, update, mocker, fee) -> None:
|
|||||||
telegram._status(update=update, context=MagicMock())
|
telegram._status(update=update, context=MagicMock())
|
||||||
assert msg_mock.call_count == 4
|
assert msg_mock.call_count == 4
|
||||||
msg = msg_mock.call_args_list[0][0][0]
|
msg = msg_mock.call_args_list[0][0][0]
|
||||||
assert re.search(r'Number of Buy.*2', msg)
|
assert re.search(r'Number of Entries.*2', msg)
|
||||||
assert re.search(r'Average Buy Price', msg)
|
assert re.search(r'Average Entry Price', msg)
|
||||||
assert re.search(r'Order filled at', msg)
|
assert re.search(r'Order filled at', msg)
|
||||||
assert re.search(r'Close Date:', msg) is None
|
assert re.search(r'Close Date:', msg) is None
|
||||||
assert re.search(r'Close Profit:', msg) is None
|
assert re.search(r'Close Profit:', msg) is None
|
||||||
|
Loading…
Reference in New Issue
Block a user