remove markdown formatting from exception string

This commit is contained in:
gcarq
2018-06-22 03:37:19 +02:00
parent ada87ba3a0
commit ec4e6272d0
3 changed files with 20 additions and 20 deletions

View File

@@ -89,11 +89,11 @@ def test_rpc_status_table(default_conf, ticker, fee, mocker) -> None:
rpc = RPC(freqtradebot)
freqtradebot.state = State.STOPPED
with pytest.raises(RPCException, match=r'.*\*Status:\* `trader is not running``*'):
with pytest.raises(RPCException, match=r'.*trader is not running*'):
rpc._rpc_status_table()
freqtradebot.state = State.RUNNING
with pytest.raises(RPCException, match=r'.*\*Status:\* `no active order`*'):
with pytest.raises(RPCException, match=r'.*no active order*'):
rpc._rpc_status_table()
freqtradebot.create_trade()
@@ -415,11 +415,11 @@ def test_rpc_forcesell(default_conf, ticker, fee, mocker) -> None:
rpc = RPC(freqtradebot)
freqtradebot.state = State.STOPPED
with pytest.raises(RPCException, match=r'.*`trader is not running`*'):
with pytest.raises(RPCException, match=r'.*trader is not running*'):
rpc._rpc_forcesell(None)
freqtradebot.state = State.RUNNING
with pytest.raises(RPCException, match=r'.*Invalid argument.*'):
with pytest.raises(RPCException, match=r'.*invalid argument*'):
rpc._rpc_forcesell(None)
rpc._rpc_forcesell('all')
@@ -430,10 +430,10 @@ def test_rpc_forcesell(default_conf, ticker, fee, mocker) -> None:
rpc._rpc_forcesell('1')
freqtradebot.state = State.STOPPED
with pytest.raises(RPCException, match=r'.*`trader is not running`*'):
with pytest.raises(RPCException, match=r'.*trader is not running*'):
rpc._rpc_forcesell(None)
with pytest.raises(RPCException, match=r'.*`trader is not running`*'):
with pytest.raises(RPCException, match=r'.*trader is not running*'):
rpc._rpc_forcesell('all')
freqtradebot.state = State.RUNNING

View File

@@ -596,7 +596,7 @@ def test_zero_balance_handle(default_conf, update, mocker) -> None:
telegram._balance(bot=MagicMock(), update=update)
result = msg_mock.call_args_list[0][0][0]
assert msg_mock.call_count == 1
assert '`All balances are zero.`' in result
assert 'all balances are zero' in result
def test_start_handle(default_conf, update, mocker) -> None:
@@ -871,7 +871,7 @@ def test_forcesell_handle_invalid(default_conf, update, mocker) -> None:
update.message.text = '/forcesell'
telegram._forcesell(bot=MagicMock(), update=update)
assert msg_mock.call_count == 1
assert 'Invalid argument' in msg_mock.call_args_list[0][0][0]
assert 'invalid argument' in msg_mock.call_args_list[0][0][0]
# Invalid argument
msg_mock.reset_mock()
@@ -879,7 +879,7 @@ def test_forcesell_handle_invalid(default_conf, update, mocker) -> None:
update.message.text = '/forcesell 123456'
telegram._forcesell(bot=MagicMock(), update=update)
assert msg_mock.call_count == 1
assert 'Invalid argument.' in msg_mock.call_args_list[0][0][0]
assert 'invalid argument' in msg_mock.call_args_list[0][0][0]
def test_performance_handle(default_conf, update, ticker, fee,