Merge branch 'develop' into feat/plot_module
This commit is contained in:
@@ -756,6 +756,7 @@ def test_forcesell_handle(default_conf, update, ticker, fee,
|
||||
'gain': 'profit',
|
||||
'limit': 1.172e-05,
|
||||
'amount': 90.99181073703367,
|
||||
'order_type': 'limit',
|
||||
'open_rate': 1.099e-05,
|
||||
'current_rate': 1.172e-05,
|
||||
'profit_amount': 6.126e-05,
|
||||
@@ -810,6 +811,7 @@ def test_forcesell_down_handle(default_conf, update, ticker, fee,
|
||||
'gain': 'loss',
|
||||
'limit': 1.044e-05,
|
||||
'amount': 90.99181073703367,
|
||||
'order_type': 'limit',
|
||||
'open_rate': 1.099e-05,
|
||||
'current_rate': 1.044e-05,
|
||||
'profit_amount': -5.492e-05,
|
||||
@@ -855,6 +857,7 @@ def test_forcesell_all_handle(default_conf, update, ticker, fee, markets, mocker
|
||||
'gain': 'loss',
|
||||
'limit': 1.098e-05,
|
||||
'amount': 90.99181073703367,
|
||||
'order_type': 'limit',
|
||||
'open_rate': 1.099e-05,
|
||||
'current_rate': 1.098e-05,
|
||||
'profit_amount': -5.91e-06,
|
||||
@@ -1188,6 +1191,7 @@ def test_send_msg_buy_notification(default_conf, mocker) -> None:
|
||||
'exchange': 'Bittrex',
|
||||
'pair': 'ETH/BTC',
|
||||
'limit': 1.099e-05,
|
||||
'order_type': 'limit',
|
||||
'stake_amount': 0.001,
|
||||
'stake_amount_fiat': 0.0,
|
||||
'stake_currency': 'BTC',
|
||||
@@ -1195,7 +1199,7 @@ def test_send_msg_buy_notification(default_conf, mocker) -> None:
|
||||
})
|
||||
assert msg_mock.call_args[0][0] \
|
||||
== '*Bittrex:* Buying ETH/BTC\n' \
|
||||
'with limit `0.00001099\n' \
|
||||
'at rate `0.00001099\n' \
|
||||
'(0.001000 BTC,0.000 USD)`'
|
||||
|
||||
|
||||
@@ -1217,6 +1221,7 @@ def test_send_msg_sell_notification(default_conf, mocker) -> None:
|
||||
'gain': 'loss',
|
||||
'limit': 3.201e-05,
|
||||
'amount': 1333.3333333333335,
|
||||
'order_type': 'market',
|
||||
'open_rate': 7.5e-05,
|
||||
'current_rate': 3.201e-05,
|
||||
'profit_amount': -0.05746268,
|
||||
@@ -1227,7 +1232,7 @@ def test_send_msg_sell_notification(default_conf, mocker) -> None:
|
||||
})
|
||||
assert msg_mock.call_args[0][0] \
|
||||
== ('*Binance:* Selling KEY/ETH\n'
|
||||
'*Limit:* `0.00003201`\n'
|
||||
'*Rate:* `0.00003201`\n'
|
||||
'*Amount:* `1333.33333333`\n'
|
||||
'*Open Rate:* `0.00007500`\n'
|
||||
'*Current Rate:* `0.00003201`\n'
|
||||
@@ -1242,6 +1247,7 @@ def test_send_msg_sell_notification(default_conf, mocker) -> None:
|
||||
'gain': 'loss',
|
||||
'limit': 3.201e-05,
|
||||
'amount': 1333.3333333333335,
|
||||
'order_type': 'market',
|
||||
'open_rate': 7.5e-05,
|
||||
'current_rate': 3.201e-05,
|
||||
'profit_amount': -0.05746268,
|
||||
@@ -1251,7 +1257,7 @@ def test_send_msg_sell_notification(default_conf, mocker) -> None:
|
||||
})
|
||||
assert msg_mock.call_args[0][0] \
|
||||
== ('*Binance:* Selling KEY/ETH\n'
|
||||
'*Limit:* `0.00003201`\n'
|
||||
'*Rate:* `0.00003201`\n'
|
||||
'*Amount:* `1333.33333333`\n'
|
||||
'*Open Rate:* `0.00007500`\n'
|
||||
'*Current Rate:* `0.00003201`\n'
|
||||
@@ -1339,6 +1345,7 @@ def test_send_msg_buy_notification_no_fiat(default_conf, mocker) -> None:
|
||||
'exchange': 'Bittrex',
|
||||
'pair': 'ETH/BTC',
|
||||
'limit': 1.099e-05,
|
||||
'order_type': 'limit',
|
||||
'stake_amount': 0.001,
|
||||
'stake_amount_fiat': 0.0,
|
||||
'stake_currency': 'BTC',
|
||||
@@ -1346,7 +1353,7 @@ def test_send_msg_buy_notification_no_fiat(default_conf, mocker) -> None:
|
||||
})
|
||||
assert msg_mock.call_args[0][0] \
|
||||
== '*Bittrex:* Buying ETH/BTC\n' \
|
||||
'with limit `0.00001099\n' \
|
||||
'at rate `0.00001099\n' \
|
||||
'(0.001000 BTC)`'
|
||||
|
||||
|
||||
@@ -1367,6 +1374,7 @@ def test_send_msg_sell_notification_no_fiat(default_conf, mocker) -> None:
|
||||
'gain': 'loss',
|
||||
'limit': 3.201e-05,
|
||||
'amount': 1333.3333333333335,
|
||||
'order_type': 'limit',
|
||||
'open_rate': 7.5e-05,
|
||||
'current_rate': 3.201e-05,
|
||||
'profit_amount': -0.05746268,
|
||||
@@ -1377,7 +1385,7 @@ def test_send_msg_sell_notification_no_fiat(default_conf, mocker) -> None:
|
||||
})
|
||||
assert msg_mock.call_args[0][0] \
|
||||
== '*Binance:* Selling KEY/ETH\n' \
|
||||
'*Limit:* `0.00003201`\n' \
|
||||
'*Rate:* `0.00003201`\n' \
|
||||
'*Amount:* `1333.33333333`\n' \
|
||||
'*Open Rate:* `0.00007500`\n' \
|
||||
'*Current Rate:* `0.00003201`\n' \
|
||||
|
@@ -74,6 +74,7 @@ def test_send_msg(default_conf, mocker):
|
||||
'gain': "profit",
|
||||
'limit': 0.005,
|
||||
'amount': 0.8,
|
||||
'order_type': 'limit',
|
||||
'open_rate': 0.004,
|
||||
'current_rate': 0.005,
|
||||
'profit_amount': 0.001,
|
||||
@@ -126,6 +127,7 @@ def test_exception_send_msg(default_conf, mocker, caplog):
|
||||
'exchange': 'Bittrex',
|
||||
'pair': 'ETH/BTC',
|
||||
'limit': 0.005,
|
||||
'order_type': 'limit',
|
||||
'stake_amount': 0.8,
|
||||
'stake_amount_fiat': 500,
|
||||
'stake_currency': 'BTC',
|
||||
|
@@ -47,9 +47,9 @@ def test_parse_args_verbose() -> None:
|
||||
assert args.loglevel == 1
|
||||
|
||||
|
||||
def test_scripts_options() -> None:
|
||||
def test_common_scripts_options() -> None:
|
||||
arguments = Arguments(['-p', 'ETH/BTC'], '')
|
||||
arguments.scripts_options()
|
||||
arguments.common_scripts_options()
|
||||
args = arguments.get_parsed_arg()
|
||||
assert args.pairs == 'ETH/BTC'
|
||||
|
||||
@@ -178,6 +178,7 @@ def test_download_data_options() -> None:
|
||||
'--exchange', 'binance'
|
||||
]
|
||||
arguments = Arguments(args, '')
|
||||
arguments.common_options()
|
||||
arguments.download_data_options()
|
||||
args = arguments.parse_args()
|
||||
assert args.pairs_file == 'file_with_pairs'
|
||||
|
@@ -1994,6 +1994,7 @@ def test_execute_sell_up(default_conf, ticker, fee, ticker_sell_up, markets, moc
|
||||
'gain': 'profit',
|
||||
'limit': 1.172e-05,
|
||||
'amount': 90.99181073703367,
|
||||
'order_type': 'limit',
|
||||
'open_rate': 1.099e-05,
|
||||
'current_rate': 1.172e-05,
|
||||
'profit_amount': 6.126e-05,
|
||||
@@ -2040,6 +2041,7 @@ def test_execute_sell_down(default_conf, ticker, fee, ticker_sell_down, markets,
|
||||
'gain': 'loss',
|
||||
'limit': 1.044e-05,
|
||||
'amount': 90.99181073703367,
|
||||
'order_type': 'limit',
|
||||
'open_rate': 1.099e-05,
|
||||
'current_rate': 1.044e-05,
|
||||
'profit_amount': -5.492e-05,
|
||||
@@ -2094,6 +2096,7 @@ def test_execute_sell_down_stoploss_on_exchange_dry_run(default_conf, ticker, fe
|
||||
'gain': 'loss',
|
||||
'limit': 1.08801e-05,
|
||||
'amount': 90.99181073703367,
|
||||
'order_type': 'limit',
|
||||
'open_rate': 1.099e-05,
|
||||
'current_rate': 1.044e-05,
|
||||
'profit_amount': -1.498e-05,
|
||||
@@ -2265,6 +2268,7 @@ def test_execute_sell_without_conf_sell_up(default_conf, ticker, fee,
|
||||
'gain': 'profit',
|
||||
'limit': 1.172e-05,
|
||||
'amount': 90.99181073703367,
|
||||
'order_type': 'limit',
|
||||
'open_rate': 1.099e-05,
|
||||
'current_rate': 1.172e-05,
|
||||
'profit_amount': 6.126e-05,
|
||||
@@ -2312,6 +2316,7 @@ def test_execute_sell_without_conf_sell_down(default_conf, ticker, fee,
|
||||
'gain': 'loss',
|
||||
'limit': 1.044e-05,
|
||||
'amount': 90.99181073703367,
|
||||
'order_type': 'limit',
|
||||
'open_rate': 1.099e-05,
|
||||
'current_rate': 1.044e-05,
|
||||
'profit_amount': -5.492e-05,
|
||||
|
@@ -1,17 +1,18 @@
|
||||
from freqtrade.utils import setup_configuration, start_list_exchanges
|
||||
from freqtrade.utils import setup_utils_configuration, start_list_exchanges
|
||||
from freqtrade.tests.conftest import get_args
|
||||
from freqtrade.state import RunMode
|
||||
|
||||
import re
|
||||
|
||||
|
||||
def test_setup_configuration():
|
||||
def test_setup_utils_configuration():
|
||||
args = [
|
||||
'--config', 'config.json.example',
|
||||
]
|
||||
|
||||
config = setup_configuration(get_args(args), RunMode.OTHER)
|
||||
config = setup_utils_configuration(get_args(args), RunMode.OTHER)
|
||||
assert "exchange" in config
|
||||
assert config['exchange']['dry_run'] is True
|
||||
assert config['exchange']['key'] == ''
|
||||
assert config['exchange']['secret'] == ''
|
||||
|
||||
|
Reference in New Issue
Block a user