add more decimals to inverse test to ensure it handles decimals properly
This commit is contained in:
parent
02e608fa02
commit
a29573320e
1 changed files with 3 additions and 3 deletions
|
|
@ -251,13 +251,13 @@ def test_add_inverse_rates_returns_expected():
|
|||
a_rate = ExchangeRate(
|
||||
from_currency=Currency.EUR,
|
||||
to_currency=Currency.USD,
|
||||
rate=Decimal("1.25"),
|
||||
rate=Decimal("1.12345000"),
|
||||
rate_date=datetime.date(2020, 3, 10),
|
||||
)
|
||||
inverse_rate = ExchangeRate(
|
||||
from_currency=Currency.USD,
|
||||
to_currency=Currency.EUR,
|
||||
rate=Decimal("0.8"),
|
||||
rate=Decimal("0.89011527"),
|
||||
rate_date=datetime.date(2020, 3, 10),
|
||||
)
|
||||
|
||||
|
|
@ -270,7 +270,7 @@ def test_add_inverse_rates_returns_expected():
|
|||
assert len(rates) == 2
|
||||
|
||||
assert rates.is_rate_present(inverse_rate)
|
||||
assert rates[inverse_rate.descriptor].amount == Decimal("0.8")
|
||||
assert rates[inverse_rate.descriptor].amount == Decimal("0.89011527")
|
||||
|
||||
|
||||
def test_add_inverse_rates_runs_on_empty_rates():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue