remove numbers from test method names

This commit is contained in:
Janne Sinivirta
2017-10-01 11:11:20 +03:00
parent 9cca42e371
commit 616d5b61cc
4 changed files with 14 additions and 15 deletions

View File

@@ -56,7 +56,7 @@ class MagicBot(MagicMock, Bot):
pass
def test_1_status_handle(conf, update):
def test_status_handle(conf, update):
with patch.dict('freqtrade.main._CONF', conf):
with patch('freqtrade.main.get_buy_signal', side_effect=lambda _: True):
msg_mock = MagicMock()
@@ -80,7 +80,7 @@ def test_1_status_handle(conf, update):
assert msg_mock.call_count == 2
assert '[BTC_ETH]' in msg_mock.call_args_list[-1][0][0]
def test_2_profit_handle(conf, update):
def test_profit_handle(conf, update):
with patch.dict('freqtrade.main._CONF', conf):
with patch('freqtrade.main.get_buy_signal', side_effect=lambda _: True):
msg_mock = MagicMock()
@@ -109,7 +109,7 @@ def test_2_profit_handle(conf, update):
assert msg_mock.call_count == 2
assert '(100.00%)' in msg_mock.call_args_list[-1][0][0]
def test_3_forcesell_handle(conf, update):
def test_forcesell_handle(conf, update):
with patch.dict('freqtrade.main._CONF', conf):
with patch('freqtrade.main.get_buy_signal', side_effect=lambda _: True):
msg_mock = MagicMock()
@@ -136,7 +136,7 @@ def test_3_forcesell_handle(conf, update):
assert 'Selling [BTC/ETH]' in msg_mock.call_args_list[-1][0][0]
assert '0.072561' in msg_mock.call_args_list[-1][0][0]
def test_4_performance_handle(conf, update):
def test_performance_handle(conf, update):
with patch.dict('freqtrade.main._CONF', conf):
with patch('freqtrade.main.get_buy_signal', side_effect=lambda _: True):
msg_mock = MagicMock()
@@ -166,7 +166,7 @@ def test_4_performance_handle(conf, update):
assert 'Performance' in msg_mock.call_args_list[-1][0][0]
assert 'BTC_ETH 100.00%' in msg_mock.call_args_list[-1][0][0]
def test_5_start_handle(conf, update):
def test_start_handle(conf, update):
with patch.dict('freqtrade.main._CONF', conf):
msg_mock = MagicMock()
with patch.multiple('freqtrade.main.telegram', _CONF=conf, init=MagicMock(), send_msg=msg_mock):
@@ -178,7 +178,7 @@ def test_5_start_handle(conf, update):
assert get_state() == State.RUNNING
assert msg_mock.call_count == 0
def test_6_stop_handle(conf, update):
def test_stop_handle(conf, update):
with patch.dict('freqtrade.main._CONF', conf):
msg_mock = MagicMock()
with patch.multiple('freqtrade.main.telegram', _CONF=conf, init=MagicMock(), send_msg=msg_mock):
@@ -190,4 +190,3 @@ def test_6_stop_handle(conf, update):
assert get_state() == State.STOPPED
assert msg_mock.call_count == 1
assert 'Stopping trader' in msg_mock.call_args_list[0][0][0]