fix tests

This commit is contained in:
Stefano Ariestasia 2022-02-07 07:31:35 +00:00
parent 099a03f190
commit 92d1f2b945
2 changed files with 3 additions and 3 deletions

View File

@ -239,7 +239,7 @@ def test_rpc_status_table(default_conf, ticker, fee, mocker) -> None:
rpc._config['position_adjustment_enable'] = True
rpc._config['max_entry_position_adjustment'] = 3
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
# 4th column should be 1/4 - as 1 order filled (a total of 4 is possible)
# 3 on top of the initial one.

View File

@ -260,8 +260,8 @@ def test_telegram_status_multi_entry(default_conf, update, mocker, fee) -> None:
telegram._status(update=update, context=MagicMock())
assert msg_mock.call_count == 4
msg = msg_mock.call_args_list[0][0][0]
assert re.search(r'Number of Buy.*2', msg)
assert re.search(r'Average Buy Price', msg)
assert re.search(r'Number of Entries.*2', msg)
assert re.search(r'Average Entry Price', msg)
assert re.search(r'Order filled at', msg)
assert re.search(r'Close Date:', msg) is None
assert re.search(r'Close Profit:', msg) is None