pairs input gets handled

This commit is contained in:
Pablo Martin 2025-05-26 15:14:01 +02:00
parent 7cfbe2284d
commit 92eca9e06b
3 changed files with 38 additions and 5 deletions

View file

@ -4,6 +4,7 @@ import pathlib
import pytest
from money.currency import Currency
from xexe.currency_pair import CurrencyPair
from xexe.inputs_handling import handle_get_rates_inputs
from xexe.utils import DateRange
@ -142,7 +143,11 @@ def test_handle_input_rates_with_pairs_works_fine():
start_date=datetime.datetime.now().date(),
end_date=datetime.datetime.now().date(),
),
"pairs": {"Pending real object"},
"pairs": {
CurrencyPair(from_currency=Currency["USD"], to_currency=Currency["EUR"]),
CurrencyPair(from_currency=Currency["EUR"], to_currency=Currency["USD"]),
CurrencyPair(from_currency=Currency["GBP"], to_currency=Currency["ZAR"]),
},
"dry_run": False,
"rates_source": "mock",
"ignore_warnings": True,