Skip to content

Commit 841e480

Browse files
committed
test: add test for get_dry_run_wallet
1 parent a0e9b77 commit 841e480

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/util/test_wallet_util.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import pytest
2+
3+
from freqtrade.util import get_dry_run_wallet
4+
5+
6+
@pytest.mark.parametrize(
7+
"wallet,stake_currency,expected",
8+
[
9+
(1000, "USDT", 1000),
10+
({"USDT": 1000, "USDC": 500}, "USDT", 1000),
11+
({"USDT": 1000, "USDC": 500}, "USDC", 500),
12+
({"USDT": 1000, "USDC": 500}, "NOCURR", 0.0),
13+
],
14+
)
15+
def test_get_dry_run_wallet(default_conf_usdt, wallet, stake_currency, expected):
16+
# As int
17+
default_conf_usdt["dry_run_wallet"] = wallet
18+
default_conf_usdt["stake_currency"] = stake_currency
19+
assert get_dry_run_wallet(default_conf_usdt) == expected

0 commit comments

Comments
 (0)