remove balance column on statistics view; updated unit tests

This commit is contained in:
James Leong 2019-12-22 10:16:45 -08:00
parent a00a9ff6b0
commit 1217bd0b21
2 changed files with 4 additions and 9 deletions

View file

@ -18,14 +18,13 @@
{% block content %} {% block content %}
<table id="bill_table" class="split_bills table table-striped"> <table id="bill_table" class="split_bills table table-striped">
<thead><tr><th>{{ _("Who?") }}</th><th>{{ _("Paid") }}</th><th>{{ _("Spent") }}</th><th>{{ _("Balance") }}</th></tr></thead> <thead><tr><th>{{ _("Who?") }}</th><th>{{ _("Paid") }}</th><th>{{ _("Spent") }}</th></tr></thead>
<tbody> <tbody>
{% for stat in members_stats %} {% for stat in members_stats %}
<tr> <tr>
<td>{{ stat.member.name }}</td> <td>{{ stat.member.name }}</td>
<td>{{ "%0.2f"|format(stat.paid) }}</td> <td>{{ "%0.2f"|format(stat.paid) }}</td>
<td>{{ "%0.2f"|format(stat.spent) }}</td> <td>{{ "%0.2f"|format(stat.spent) }}</td>
<td>{{ "%0.2f"|format(stat.balance) }}</td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>

View file

@ -933,28 +933,24 @@ class BudgetTestCase(IhatemoneyTestCase):
self.assertIn( self.assertIn(
"<td>alexis</td>\n " "<td>alexis</td>\n "
+ "<td>20.00</td>\n " + "<td>20.00</td>\n "
+ "<td>31.67</td>\n " + "<td>31.67</td>\n",
+ "<td>-11.67</td>\n",
response.data.decode("utf-8"), response.data.decode("utf-8"),
) )
self.assertIn( self.assertIn(
"<td>fred</td>\n " "<td>fred</td>\n "
+ "<td>20.00</td>\n " + "<td>20.00</td>\n "
+ "<td>5.83</td>\n " + "<td>5.83</td>\n",
+ "<td>14.17</td>\n",
response.data.decode("utf-8"), response.data.decode("utf-8"),
) )
self.assertIn( self.assertIn(
"<td>tata</td>\n " "<td>tata</td>\n "
+ "<td>0.00</td>\n " + "<td>0.00</td>\n "
+ "<td>2.50</td>\n " + "<td>2.50</td>\n",
+ "<td>-2.50</td>\n",
response.data.decode("utf-8"), response.data.decode("utf-8"),
) )
self.assertIn( self.assertIn(
"<td>toto</td>\n " "<td>toto</td>\n "
+ "<td>0.00</td>\n " + "<td>0.00</td>\n "
+ "<td>0.00</td>\n "
+ "<td>0.00</td>\n", + "<td>0.00</td>\n",
response.data.decode("utf-8"), response.data.decode("utf-8"),
) )