Fix tests that require amount_requested

This commit is contained in:
Matthias 2020-07-15 20:27:00 +02:00
parent eafab38db3
commit c1c018d8fe
3 changed files with 8 additions and 0 deletions

View File

@ -176,6 +176,7 @@ def create_mock_trades(fee):
pair='ETH/BTC',
stake_amount=0.001,
amount=123.0,
amount_requested=123.0,
fee_open=fee.return_value,
fee_close=fee.return_value,
open_rate=0.123,
@ -188,6 +189,7 @@ def create_mock_trades(fee):
pair='ETC/BTC',
stake_amount=0.001,
amount=123.0,
amount_requested=123.0,
fee_open=fee.return_value,
fee_close=fee.return_value,
open_rate=0.123,
@ -204,6 +206,7 @@ def create_mock_trades(fee):
pair='ETC/BTC',
stake_amount=0.001,
amount=123.0,
amount_requested=124.0,
fee_open=fee.return_value,
fee_close=fee.return_value,
open_rate=0.123,

View File

@ -80,6 +80,7 @@ def test_rpc_trade_status(default_conf, ticker, fee, mocker) -> None:
'close_rate': None,
'current_rate': 1.099e-05,
'amount': 91.07468124,
'amount_requested': 91.07468124,
'stake_amount': 0.001,
'close_profit': None,
'close_profit_pct': None,
@ -143,6 +144,7 @@ def test_rpc_trade_status(default_conf, ticker, fee, mocker) -> None:
'close_rate': None,
'current_rate': ANY,
'amount': 91.07468124,
'amount_requested': 91.07468124,
'stake_amount': 0.001,
'close_profit': None,
'close_profit_pct': None,

View File

@ -520,6 +520,7 @@ def test_api_status(botclient, mocker, ticker, fee, markets):
assert_response(rc)
assert len(rc.json) == 1
assert rc.json == [{'amount': 91.07468124,
'amount_requested': 91.07468124,
'base_currency': 'BTC',
'close_date': None,
'close_date_hum': None,
@ -641,6 +642,7 @@ def test_api_forcebuy(botclient, mocker, fee):
fbuy_mock = MagicMock(return_value=Trade(
pair='ETH/ETH',
amount=1,
amount_requested=1,
exchange='bittrex',
stake_amount=1,
open_rate=0.245441,
@ -657,6 +659,7 @@ def test_api_forcebuy(botclient, mocker, fee):
data='{"pair": "ETH/BTC"}')
assert_response(rc)
assert rc.json == {'amount': 1,
'amount_requested': 1,
'trade_id': None,
'close_date': None,
'close_date_hum': None,