aboutsummaryrefslogtreecommitdiff
path: root/ihatemoney/tests
diff options
context:
space:
mode:
authorGlandos <adrien@antipoul.fr>2020-02-20 09:43:50 +0100
committerGitHub <noreply@github.com>2020-02-20 09:43:50 +0100
commit5ec3dc0accbd5d66caa0abde249e69d35afc68e8 (patch)
tree75cfd021d93290e6c7eb9633197237105cabec9a /ihatemoney/tests
parent9378694034d6e9040548b9e65ea65769fb8272b7 (diff)
downloadihatemoney-mirror-5ec3dc0accbd5d66caa0abde249e69d35afc68e8.zip
ihatemoney-mirror-5ec3dc0accbd5d66caa0abde249e69d35afc68e8.tar.gz
ihatemoney-mirror-5ec3dc0accbd5d66caa0abde249e69d35afc68e8.tar.bz2
Align tables in statistics (#535)
* Align tables in statistics The table in sidebar is now aligned with the one in content, to avoid redundant informations. All tables are back to normal on small devices. * fix test * run black on tests
Diffstat (limited to 'ihatemoney/tests')
-rw-r--r--ihatemoney/tests/tests.py30
1 files changed, 25 insertions, 5 deletions
diff --git a/ihatemoney/tests/tests.py b/ihatemoney/tests/tests.py
index a12613c..c4b1585 100644
--- a/ihatemoney/tests/tests.py
+++ b/ihatemoney/tests/tests.py
@@ -931,22 +931,42 @@ class BudgetTestCase(IhatemoneyTestCase):
)
response = self.client.get("/raclette/statistics")
+ first_cell = '<td class="d-md-none">'
+ indent = "\n "
self.assertIn(
- "<td>alexis</td>\n "
- + "<td>20.00</td>\n "
+ first_cell
+ + "alexis</td>"
+ + indent
+ + "<td>20.00</td>"
+ + indent
+ "<td>31.67</td>\n",
response.data.decode("utf-8"),
)
self.assertIn(
- "<td>fred</td>\n " + "<td>20.00</td>\n " + "<td>5.83</td>\n",
+ first_cell
+ + "fred</td>"
+ + indent
+ + "<td>20.00</td>"
+ + indent
+ + "<td>5.83</td>\n",
response.data.decode("utf-8"),
)
self.assertIn(
- "<td>tata</td>\n " + "<td>0.00</td>\n " + "<td>2.50</td>\n",
+ first_cell
+ + "tata</td>"
+ + indent
+ + "<td>0.00</td>"
+ + indent
+ + "<td>2.50</td>\n",
response.data.decode("utf-8"),
)
self.assertIn(
- "<td>toto</td>\n " + "<td>0.00</td>\n " + "<td>0.00</td>\n",
+ first_cell
+ + "toto</td>"
+ + indent
+ + "<td>0.00</td>"
+ + indent
+ + "<td>0.00</td>\n",
response.data.decode("utf-8"),
)