mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Fix tests that require amount_requested
This commit is contained in:
parent
eafab38db3
commit
c1c018d8fe
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user