mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-04-30 10:12:37 +02:00
#838: Add decima weight round test cases
This commit is contained in:
parent
49abd7fedd
commit
7bf7db24bd
1 changed files with 14 additions and 0 deletions
|
@ -2102,6 +2102,20 @@ class BudgetTestCase(IhatemoneyTestCase):
|
|||
]
|
||||
assert no_currency_bills == [(5.0, 5.0), (10.0, 10.0)]
|
||||
|
||||
def test_decimals_on_weighted_members_list(self):
|
||||
|
||||
self.post_project("raclette")
|
||||
|
||||
# add three users with different weights
|
||||
self.client.post("/raclette/members/add", data={"name": "zorglub", "weight": 1.0})
|
||||
self.client.post("/raclette/members/add", data={"name": "tata", "weight": 1.10})
|
||||
self.client.post("/raclette/members/add", data={"name": "fred", "weight": 1.15})
|
||||
|
||||
# check if weights of the users are 1, 1.1, 1.15 respectively
|
||||
resp = self.client.get("/raclette/")
|
||||
self.assertIn("zorglub<span class=\"light\">(x1)</span>", resp.data.decode("utf-8"))
|
||||
self.assertIn("tata<span class=\"light\">(x1.1)</span>", resp.data.decode("utf-8"))
|
||||
self.assertIn("fred<span class=\"light\">(x1.15)</span>", resp.data.decode("utf-8"))
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
Loading…
Reference in a new issue