Check minimal amount

This commit is contained in:
Anton
2018-06-12 01:05:43 +03:00
parent 90025d0ac4
commit 708320318c
2 changed files with 19 additions and 3 deletions

View File

@@ -249,11 +249,21 @@ def test_get_trade_stake_amount_no_stake_amount(default_conf,
get_balance=MagicMock(return_value=default_conf['stake_amount'] * 0.5)
)
# test defined stake amount
freqtrade = FreqtradeBot(default_conf)
with pytest.raises(DependencyException, match=r'.*stake amount.*'):
freqtrade._get_trade_stake_amount()
# test UNLIMITED_STAKE_AMOUNT
conf = deepcopy(default_conf)
conf['stake_amount'] = constants.UNLIMITED_STAKE_AMOUNT
conf['max_open_trades'] = 2
freqtrade = FreqtradeBot(conf)
with pytest.raises(DependencyException, match=r'.*is lower than minimal.*'):
freqtrade._get_trade_stake_amount()
def test_get_trade_stake_amount_unlimited_amount(default_conf,
ticker,