feat: Allow empty fiat_display_currency

(instead of completely deleting that key)
This commit is contained in:
Matthias
2024-05-22 20:30:35 +02:00
parent 23aef6e054
commit c3fa8a4c45
3 changed files with 17 additions and 2 deletions

View File

@@ -2564,10 +2564,14 @@ def test_send_msg_buy_notification_no_fiat(
("Short", "short_signal_01", 2.0),
],
)
@pytest.mark.parametrize("fiat", ["", None])
def test_send_msg_exit_notification_no_fiat(
default_conf, mocker, direction, enter_signal, leverage, time_machine
default_conf, mocker, direction, enter_signal, leverage, time_machine, fiat
) -> None:
del default_conf["fiat_display_currency"]
if fiat is None:
del default_conf["fiat_display_currency"]
else:
default_conf["fiat_display_currency"] = fiat
time_machine.move_to("2022-05-02 00:00:00 +00:00", tick=False)
telegram, _, msg_mock = get_telegram_testobject(mocker, default_conf)