mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-05-06 05:01:48 +02:00
Make small ammendments to tests
This commit is contained in:
parent
54ef41bded
commit
487e7d595c
2 changed files with 6 additions and 0 deletions
|
@ -1146,6 +1146,7 @@ class BudgetTestCase(IhatemoneyTestCase):
|
|||
"payed_for": [1, 2, 3, 4],
|
||||
"amount": "10.0",
|
||||
"original_currency": "USD",
|
||||
"original_amount": "10.0",
|
||||
},
|
||||
)
|
||||
|
||||
|
@ -1158,6 +1159,7 @@ class BudgetTestCase(IhatemoneyTestCase):
|
|||
"payed_for": [1, 3],
|
||||
"amount": "200",
|
||||
"original_currency": "USD",
|
||||
"original_amount": "200",
|
||||
},
|
||||
)
|
||||
|
||||
|
@ -1170,6 +1172,7 @@ class BudgetTestCase(IhatemoneyTestCase):
|
|||
"payed_for": [2],
|
||||
"amount": "13.33",
|
||||
"original_currency": "USD",
|
||||
"original_amount": "13.33",
|
||||
},
|
||||
)
|
||||
|
||||
|
|
|
@ -29,6 +29,9 @@ class CurrencyConverter(object):
|
|||
return currencies
|
||||
|
||||
def exchange_currency(self, amount, currency1, currency2):
|
||||
if currency1 == currency2:
|
||||
return amount
|
||||
|
||||
base = self.response["base"]
|
||||
conversion_rate1 = self.response["rates"][currency1]
|
||||
conversion_rate2 = self.response["rates"][currency2]
|
||||
|
|
Loading…
Reference in a new issue