From 203a31fcf52360c928325c150f547024e953716d Mon Sep 17 00:00:00 2001 From: Sungho Cho Date: Sun, 8 Dec 2019 17:11:07 -0500 Subject: [PATCH 01/10] Fix minor issues with BillForm task --- ihatemoney/forms.py | 4 ++-- ihatemoney/templates/forms.html | 2 +- ihatemoney/tests/tests.py | 12 ++++++++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ihatemoney/forms.py b/ihatemoney/forms.py index 3d80d319..a9780faa 100644 --- a/ihatemoney/forms.py +++ b/ihatemoney/forms.py @@ -38,7 +38,7 @@ def get_billform_for(project, set_default=True, **kwargs): display the default form, it will call set_default on it. """ - form = BillForm(project=project, **kwargs) + form = BillForm(**kwargs) form.original_currency.label = Label("original_currency", "Currency (Default: %s)" % (project.default_currency)) active_members = [(m.id, m.name) for m in project.active_members] @@ -193,7 +193,7 @@ class BillForm(FlaskForm): bill.date = self.date.data bill.owers = [Person.query.get(ower, project) for ower in self.payed_for.data] bill.original_currency = self.original_currency.data - bill.original_amount = currency_helper.exchange_currency(bill.amount, bill.original_currency, project.default_currency) + bill.original_amount = self.currency_helper.exchange_currency(bill.amount, bill.original_currency, project.default_currency) return bill diff --git a/ihatemoney/templates/forms.html b/ihatemoney/templates/forms.html index 739c2c37..fa1a24ac 100644 --- a/ihatemoney/templates/forms.html +++ b/ihatemoney/templates/forms.html @@ -97,8 +97,8 @@ {{ input(form.what, inline=True) }} {{ input(form.payer, inline=True, class="form-control custom-select") }} {{ input(form.amount, inline=True) }} - {{ input(form.external_link, inline=True) }} {{ input(form.original_currency, inline=True) }} + {{ input(form.external_link, inline=True) }}
diff --git a/ihatemoney/tests/tests.py b/ihatemoney/tests/tests.py index fb96d358..5eeb07e6 100644 --- a/ihatemoney/tests/tests.py +++ b/ihatemoney/tests/tests.py @@ -1099,6 +1099,8 @@ class BudgetTestCase(IhatemoneyTestCase): "payer": 1, "payed_for": [1, 2, 3, 4], "amount": "10.0", + "original_amount": "10.0", + "original_currency": "USD", }, ) @@ -1110,6 +1112,8 @@ class BudgetTestCase(IhatemoneyTestCase): "payer": 2, "payed_for": [1, 3], "amount": "200", + "original_amount": "200", + "original_currency": "USD", }, ) @@ -1121,6 +1125,8 @@ class BudgetTestCase(IhatemoneyTestCase): "payer": 3, "payed_for": [2], "amount": "13.33", + "original_amount": "13.3", + "original_currency": "USD", }, ) @@ -1134,6 +1140,8 @@ class BudgetTestCase(IhatemoneyTestCase): "payer_name": "tata", "payer_weight": 1.0, "owers": ["fred"], + "original_amount": "13.3", + "original_currency": "USD", }, { "date": "2016-12-31", @@ -1142,6 +1150,8 @@ class BudgetTestCase(IhatemoneyTestCase): "payer_name": "fred", "payer_weight": 1.0, "owers": ["alexis", "tata"], + "original_amount": "200.0", + "original_currency": "USD", }, { "date": "2016-12-31", @@ -1150,6 +1160,8 @@ class BudgetTestCase(IhatemoneyTestCase): "payer_name": "alexis", "payer_weight": 2.0, "owers": ["alexis", "fred", "tata", "p\xe9p\xe9"], + "original_amount": "10.0", + "original_currency": "USD", }, ] self.assertEqual(json.loads(resp.data.decode("utf-8")), expected) From 261d092d239e93a295ae061fe116c917589fb3f9 Mon Sep 17 00:00:00 2001 From: Sungho Cho Date: Sun, 8 Dec 2019 17:19:24 -0500 Subject: [PATCH 02/10] Edit tests.py to include missing original_currency and amount fields --- ihatemoney/tests/tests.py | 52 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/ihatemoney/tests/tests.py b/ihatemoney/tests/tests.py index 5eeb07e6..b035ebd9 100644 --- a/ihatemoney/tests/tests.py +++ b/ihatemoney/tests/tests.py @@ -414,6 +414,8 @@ class BudgetTestCase(IhatemoneyTestCase): "payer": fred_id, "payed_for": [fred_id], "amount": "25", + "original_amount": "25", + "original_currency": "USD", }, ) @@ -465,6 +467,8 @@ class BudgetTestCase(IhatemoneyTestCase): "payer": alexis.id, "payed_for": [alexis.id], "amount": "25", + "original_amount": "25", + "original_currency": "USD", }, ) @@ -619,6 +623,8 @@ class BudgetTestCase(IhatemoneyTestCase): "payer": members_ids[0], "payed_for": members_ids, "amount": "25", + "original_amount": "25", + "original_currency": "USD", }, ) models.Project.query.get("raclette") @@ -634,6 +640,8 @@ class BudgetTestCase(IhatemoneyTestCase): "payer": members_ids[0], "payed_for": members_ids, "amount": "10", + "original_amount": "10", + "original_currency": "USD", }, ) @@ -653,6 +661,8 @@ class BudgetTestCase(IhatemoneyTestCase): "payer": members_ids[0], "payed_for": members_ids, "amount": "19", + "original_amount": "19", + "original_currency": "USD", }, ) @@ -664,6 +674,8 @@ class BudgetTestCase(IhatemoneyTestCase): "payer": members_ids[1], "payed_for": members_ids[0], "amount": "20", + "original_amount": "20", + "original_currency": "USD", }, ) @@ -675,6 +687,8 @@ class BudgetTestCase(IhatemoneyTestCase): "payer": members_ids[1], "payed_for": members_ids, "amount": "17", + "original_amount": "17", + "original_currency": "USD", }, ) @@ -690,6 +704,8 @@ class BudgetTestCase(IhatemoneyTestCase): "payer": members_ids[0], "payed_for": members_ids, "amount": "-25", + "original_amount": "-25", + "original_currency": "USD", }, ) bill = models.Bill.query.filter(models.Bill.date == "2011-08-12")[0] @@ -704,6 +720,8 @@ class BudgetTestCase(IhatemoneyTestCase): "payer": members_ids[0], "payed_for": members_ids, "amount": "25,02", + "original_amount": "25,02", + "original_currency": "USD", }, ) bill = models.Bill.query.filter(models.Bill.date == "2011-08-01")[0] @@ -729,6 +747,8 @@ class BudgetTestCase(IhatemoneyTestCase): "payer": members_ids[0], "payed_for": members_ids, "amount": "10", + "original_amount": "10", + "original_currency": "USD", }, ) @@ -740,6 +760,8 @@ class BudgetTestCase(IhatemoneyTestCase): "payer": members_ids[1], "payed_for": members_ids, "amount": "10", + "original_amount": "10", + "original_currency": "USD", }, ) @@ -804,6 +826,8 @@ class BudgetTestCase(IhatemoneyTestCase): "payer": 1, "payed_for": [1, 2, 3], "amount": "24.36", + "original_amount": "24.36", + "original_currency": "USD", }, ) @@ -815,6 +839,8 @@ class BudgetTestCase(IhatemoneyTestCase): "payer": 2, "payed_for": [1], "amount": "19.12", + "original_amount": "19.12", + "original_currency": "USD", }, ) @@ -826,6 +852,8 @@ class BudgetTestCase(IhatemoneyTestCase): "payer": 1, "payed_for": [1, 2], "amount": "22", + "original_amount": "22", + "original_currency": "USD", }, ) @@ -913,6 +941,8 @@ class BudgetTestCase(IhatemoneyTestCase): "payer": 1, "payed_for": [1, 2, 3], "amount": "10.0", + "original_amount": "10", + "original_currency": "USD", }, ) @@ -924,6 +954,8 @@ class BudgetTestCase(IhatemoneyTestCase): "payer": 2, "payed_for": [1], "amount": "20", + "original_amount": "20", + "original_currency": "USD", }, ) @@ -935,6 +967,8 @@ class BudgetTestCase(IhatemoneyTestCase): "payer": 1, "payed_for": [1, 2], "amount": "10", + "original_amount": "10", + "original_currency": "USD", }, ) @@ -992,6 +1026,8 @@ class BudgetTestCase(IhatemoneyTestCase): "payer": 1, "payed_for": [1, 2, 3], "amount": "10.0", + "original_amount": "10.0", + "original_currency": "USD", }, ) @@ -1003,6 +1039,8 @@ class BudgetTestCase(IhatemoneyTestCase): "payer": 2, "payed_for": [1], "amount": "20", + "original_amount": "20", + "original_currency": "USD", }, ) @@ -1014,6 +1052,8 @@ class BudgetTestCase(IhatemoneyTestCase): "payer": 1, "payed_for": [1, 2], "amount": "10", + "original_amount": "10", + "original_currency": "USD", }, ) project = models.Project.query.get("raclette") @@ -1045,6 +1085,8 @@ class BudgetTestCase(IhatemoneyTestCase): "payer": 1, "payed_for": [1, 2, 3], "amount": "10.0", + "original_amount": "10", + "original_currency": "USD", }, ) @@ -1056,6 +1098,8 @@ class BudgetTestCase(IhatemoneyTestCase): "payer": 2, "payed_for": [1, 3], "amount": "20", + "original_amount": "20", + "original_currency": "USD", }, ) @@ -1067,6 +1111,8 @@ class BudgetTestCase(IhatemoneyTestCase): "payer": 3, "payed_for": [2], "amount": "13.33", + "original_amount": "13.33", + "original_currency": "USD", }, ) project = models.Project.query.get("raclette") @@ -1770,6 +1816,8 @@ class APITestCase(IhatemoneyTestCase): "payer": "1", "payed_for": ["1", "2"], "amount": amount, + "original_amount": amount, + "original_currency": "USD", }, headers=self.get_auth("raclette"), ) @@ -1792,6 +1840,8 @@ class APITestCase(IhatemoneyTestCase): "payer": "1", "payed_for": ["1", "2"], "amount": "25", + "original_amount": "25", + "original_currency": "USD", }, headers=self.get_auth("raclette"), ) @@ -1859,6 +1909,8 @@ class APITestCase(IhatemoneyTestCase): "payer": "1", "payed_for": ["1", "2"], "amount": "25", + "original_amount": "25", + "original_currency": "USD", }, headers=self.get_auth("raclette"), ) From a01d50acbd6c4fee835df7ae42190142826b56eb Mon Sep 17 00:00:00 2001 From: Sungho Cho Date: Sun, 8 Dec 2019 17:28:12 -0500 Subject: [PATCH 03/10] Minor fix --- ihatemoney/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ihatemoney/forms.py b/ihatemoney/forms.py index a9780faa..7f34e56e 100644 --- a/ihatemoney/forms.py +++ b/ihatemoney/forms.py @@ -193,7 +193,7 @@ class BillForm(FlaskForm): bill.date = self.date.data bill.owers = [Person.query.get(ower, project) for ower in self.payed_for.data] bill.original_currency = self.original_currency.data - bill.original_amount = self.currency_helper.exchange_currency(bill.amount, bill.original_currency, project.default_currency) + bill.original_amount = self.currency_helper.exchange_currency(float(bill.amount), bill.original_currency, project.default_currency) return bill From 5af7f3a7b679d9608082a2452955a8d313edefb2 Mon Sep 17 00:00:00 2001 From: Sungho Cho Date: Sun, 8 Dec 2019 17:35:33 -0500 Subject: [PATCH 04/10] Fix failing tests --- ihatemoney/tests/tests.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ihatemoney/tests/tests.py b/ihatemoney/tests/tests.py index b035ebd9..f610ddf7 100644 --- a/ihatemoney/tests/tests.py +++ b/ihatemoney/tests/tests.py @@ -1145,7 +1145,6 @@ class BudgetTestCase(IhatemoneyTestCase): "payer": 1, "payed_for": [1, 2, 3, 4], "amount": "10.0", - "original_amount": "10.0", "original_currency": "USD", }, ) @@ -1158,7 +1157,6 @@ class BudgetTestCase(IhatemoneyTestCase): "payer": 2, "payed_for": [1, 3], "amount": "200", - "original_amount": "200", "original_currency": "USD", }, ) @@ -1171,7 +1169,6 @@ class BudgetTestCase(IhatemoneyTestCase): "payer": 3, "payed_for": [2], "amount": "13.33", - "original_amount": "13.3", "original_currency": "USD", }, ) @@ -1186,7 +1183,7 @@ class BudgetTestCase(IhatemoneyTestCase): "payer_name": "tata", "payer_weight": 1.0, "owers": ["fred"], - "original_amount": "13.3", + "original_amount": "13.33", "original_currency": "USD", }, { From 668a2747d901fc33f33cc12b0fb15804358478c4 Mon Sep 17 00:00:00 2001 From: Sungho Cho Date: Sun, 8 Dec 2019 17:36:27 -0500 Subject: [PATCH 05/10] Fix other failing tests --- ihatemoney/tests/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ihatemoney/tests/tests.py b/ihatemoney/tests/tests.py index f610ddf7..6b80067d 100644 --- a/ihatemoney/tests/tests.py +++ b/ihatemoney/tests/tests.py @@ -1784,7 +1784,7 @@ class APITestCase(IhatemoneyTestCase): "id": id, "external_link": "", "original_currency": "USD", - "original_amount": input_amount, + "original_amount": expected_amount, } got = json.loads(req.data.decode("utf-8")) From adb6b211744b27038ec63f90d242729a660462ed Mon Sep 17 00:00:00 2001 From: Sungho Cho Date: Sun, 8 Dec 2019 17:39:38 -0500 Subject: [PATCH 06/10] Final fix to tests --- ihatemoney/tests/tests.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ihatemoney/tests/tests.py b/ihatemoney/tests/tests.py index 6b80067d..48ae95c0 100644 --- a/ihatemoney/tests/tests.py +++ b/ihatemoney/tests/tests.py @@ -1183,7 +1183,7 @@ class BudgetTestCase(IhatemoneyTestCase): "payer_name": "tata", "payer_weight": 1.0, "owers": ["fred"], - "original_amount": "13.33", + "original_amount": 13.33, "original_currency": "USD", }, { @@ -1193,7 +1193,7 @@ class BudgetTestCase(IhatemoneyTestCase): "payer_name": "fred", "payer_weight": 1.0, "owers": ["alexis", "tata"], - "original_amount": "200.0", + "original_amount": 200.0, "original_currency": "USD", }, { @@ -1203,7 +1203,7 @@ class BudgetTestCase(IhatemoneyTestCase): "payer_name": "alexis", "payer_weight": 2.0, "owers": ["alexis", "fred", "tata", "p\xe9p\xe9"], - "original_amount": "10.0", + "original_amount": 10.0, "original_currency": "USD", }, ] From 54ef41bdedd2eb2aedea29e74406f949211c6502 Mon Sep 17 00:00:00 2001 From: Sungho Cho Date: Sun, 8 Dec 2019 17:43:25 -0500 Subject: [PATCH 07/10] Ran black on the project directory --- ihatemoney/forms.py | 21 +++++++++++++++------ ihatemoney/models.py | 1 - ihatemoney/utils.py | 16 +++++++++------- ihatemoney/web.py | 8 ++------ 4 files changed, 26 insertions(+), 20 deletions(-) diff --git a/ihatemoney/forms.py b/ihatemoney/forms.py index 7f34e56e..57f809df 100644 --- a/ihatemoney/forms.py +++ b/ihatemoney/forms.py @@ -22,7 +22,8 @@ from jinja2 import Markup import email_validator from ihatemoney.models import Project, Person -from ihatemoney.utils import slugify, eval_arithmetic_expression,CurrencyConverter +from ihatemoney.utils import slugify, eval_arithmetic_expression, CurrencyConverter + def strip_filter(string): try: @@ -39,7 +40,9 @@ def get_billform_for(project, set_default=True, **kwargs): """ form = BillForm(**kwargs) - form.original_currency.label = Label("original_currency", "Currency (Default: %s)" % (project.default_currency)) + form.original_currency.label = Label( + "original_currency", "Currency (Default: %s)" % (project.default_currency) + ) active_members = [(m.id, m.name) for m in project.active_members] form.payed_for.choices = form.payer.choices = active_members @@ -90,7 +93,9 @@ class EditProjectForm(FlaskForm): contact_email = StringField(_("Email"), validators=[DataRequired(), Email()]) currency_helper = CurrencyConverter() default_currency = SelectField( - _("Default Currency"), choices=currency_helper.get_currencies(), validators=[DataRequired()] + _("Default Currency"), + choices=currency_helper.get_currencies(), + validators=[DataRequired()], ) def save(self): @@ -103,7 +108,7 @@ class EditProjectForm(FlaskForm): id=self.id.data, password=generate_password_hash(self.password.data), contact_email=self.contact_email.data, - default_currency=self.default_currency.data + default_currency=self.default_currency.data, ) return project @@ -172,7 +177,9 @@ class BillForm(FlaskForm): amount = CalculatorStringField(_("Amount paid"), validators=[DataRequired()]) currency_helper = CurrencyConverter() original_currency = SelectField( - _("Currency"), choices=currency_helper.get_currencies(), validators=[DataRequired()] + _("Currency"), + choices=currency_helper.get_currencies(), + validators=[DataRequired()], ) external_link = URLField( _("External link"), @@ -193,7 +200,9 @@ class BillForm(FlaskForm): bill.date = self.date.data bill.owers = [Person.query.get(ower, project) for ower in self.payed_for.data] bill.original_currency = self.original_currency.data - bill.original_amount = self.currency_helper.exchange_currency(float(bill.amount), bill.original_currency, project.default_currency) + bill.original_amount = self.currency_helper.exchange_currency( + float(bill.amount), bill.original_currency, project.default_currency + ) return bill diff --git a/ihatemoney/models.py b/ihatemoney/models.py index 5cbc974d..0f4c19de 100644 --- a/ihatemoney/models.py +++ b/ihatemoney/models.py @@ -379,7 +379,6 @@ class Bill(db.Model): "external_link": self.external_link, "original_currency": self.original_currency, "original_amount": self.original_amount, - } def pay_each(self): diff --git a/ihatemoney/utils.py b/ihatemoney/utils.py index 4df76358..5c911eb7 100644 --- a/ihatemoney/utils.py +++ b/ihatemoney/utils.py @@ -14,26 +14,28 @@ from datetime import datetime, timedelta import csv import requests + class CurrencyConverter(object): - api_url = 'https://api.exchangerate-api.com/v4/latest/USD' + api_url = "https://api.exchangerate-api.com/v4/latest/USD" response = [] def __init__(self): - self.response = requests.get(self.api_url).json(); - + self.response = requests.get(self.api_url).json() + def get_currencies(self): currencies = [] for rate in self.response["rates"]: - currencies.append((rate,rate)) + currencies.append((rate, rate)) return currencies - - def exchange_currency(self,amount,currency1,currency2): + + def exchange_currency(self, amount, currency1, currency2): base = self.response["base"] conversion_rate1 = self.response["rates"][currency1] conversion_rate2 = self.response["rates"][currency2] new_amount = (amount / conversion_rate1) * conversion_rate2 # round to two digits because we are dealing with money - return round(new_amount,2) + return round(new_amount, 2) + def slugify(value): """Normalizes string, converts to lowercase, removes non-alpha characters, diff --git a/ihatemoney/web.py b/ihatemoney/web.py index eb61ae66..5a1ecd72 100644 --- a/ihatemoney/web.py +++ b/ihatemoney/web.py @@ -317,9 +317,7 @@ def create_project(): ) return redirect(url_for(".list_bills", project_id=project.id)) - return render_template( - "create_project.html", form=form, - ) + return render_template("create_project.html", form=form,) @main.route("/password-reminder", methods=["GET", "POST"]) @@ -391,9 +389,7 @@ def edit_project(): edit_form.contact_email.data = g.project.contact_email return render_template( - "edit_project.html", - edit_form=edit_form, - current_view="edit_project", + "edit_project.html", edit_form=edit_form, current_view="edit_project", ) From 487e7d595c96c78f0c6f9d9a9f1d2b2e9ffa3b59 Mon Sep 17 00:00:00 2001 From: Sungho Cho Date: Sun, 8 Dec 2019 17:52:40 -0500 Subject: [PATCH 08/10] Make small ammendments to tests --- ihatemoney/tests/tests.py | 3 +++ ihatemoney/utils.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ihatemoney/tests/tests.py b/ihatemoney/tests/tests.py index 48ae95c0..6e03e674 100644 --- a/ihatemoney/tests/tests.py +++ b/ihatemoney/tests/tests.py @@ -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", }, ) diff --git a/ihatemoney/utils.py b/ihatemoney/utils.py index 5c911eb7..696db6bf 100644 --- a/ihatemoney/utils.py +++ b/ihatemoney/utils.py @@ -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] From b723ed26f8392b683bc5908ab55fd4a471ba86c6 Mon Sep 17 00:00:00 2001 From: Sungho Cho Date: Sun, 8 Dec 2019 17:57:25 -0500 Subject: [PATCH 09/10] Temporarily set maxDiff as None --- ihatemoney/tests/tests.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ihatemoney/tests/tests.py b/ihatemoney/tests/tests.py index 6e03e674..55183665 100644 --- a/ihatemoney/tests/tests.py +++ b/ihatemoney/tests/tests.py @@ -1128,6 +1128,7 @@ class BudgetTestCase(IhatemoneyTestCase): ) def test_export(self): + self.maxDiff = None self.post_project("raclette") # add members From 400c50bc69ea46f9dffcc7665ada52c54e29c774 Mon Sep 17 00:00:00 2001 From: Sungho Cho Date: Sun, 8 Dec 2019 18:03:33 -0500 Subject: [PATCH 10/10] Fix test failure in test_export() --- ihatemoney/tests/tests.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/ihatemoney/tests/tests.py b/ihatemoney/tests/tests.py index 55183665..a41044e6 100644 --- a/ihatemoney/tests/tests.py +++ b/ihatemoney/tests/tests.py @@ -1128,7 +1128,6 @@ class BudgetTestCase(IhatemoneyTestCase): ) def test_export(self): - self.maxDiff = None self.post_project("raclette") # add members @@ -1147,7 +1146,6 @@ class BudgetTestCase(IhatemoneyTestCase): "payed_for": [1, 2, 3, 4], "amount": "10.0", "original_currency": "USD", - "original_amount": "10.0", }, ) @@ -1160,7 +1158,6 @@ class BudgetTestCase(IhatemoneyTestCase): "payed_for": [1, 3], "amount": "200", "original_currency": "USD", - "original_amount": "200", }, ) @@ -1173,7 +1170,6 @@ class BudgetTestCase(IhatemoneyTestCase): "payed_for": [2], "amount": "13.33", "original_currency": "USD", - "original_amount": "13.33", }, ) @@ -1187,8 +1183,6 @@ class BudgetTestCase(IhatemoneyTestCase): "payer_name": "tata", "payer_weight": 1.0, "owers": ["fred"], - "original_amount": 13.33, - "original_currency": "USD", }, { "date": "2016-12-31", @@ -1197,8 +1191,6 @@ class BudgetTestCase(IhatemoneyTestCase): "payer_name": "fred", "payer_weight": 1.0, "owers": ["alexis", "tata"], - "original_amount": 200.0, - "original_currency": "USD", }, { "date": "2016-12-31", @@ -1207,8 +1199,6 @@ class BudgetTestCase(IhatemoneyTestCase): "payer_name": "alexis", "payer_weight": 2.0, "owers": ["alexis", "fred", "tata", "p\xe9p\xe9"], - "original_amount": 10.0, - "original_currency": "USD", }, ] self.assertEqual(json.loads(resp.data.decode("utf-8")), expected)