mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-05-05 20:51:49 +02:00
pep8ify the tests
This commit is contained in:
parent
ff018bd0c8
commit
e70bd029b4
1 changed files with 62 additions and 59 deletions
|
@ -528,7 +528,6 @@ class BudgetTestCase(TestCase):
|
|||
resp = self.app.get("/raclette/")
|
||||
self.assertNotIn('extra-info', resp.data.decode('utf-8'))
|
||||
|
||||
|
||||
def test_rounding(self):
|
||||
self.post_project("raclette")
|
||||
|
||||
|
@ -568,7 +567,8 @@ class BudgetTestCase(TestCase):
|
|||
result[models.Project.query.get("raclette").members[1].id] = 0.0
|
||||
result[models.Project.query.get("raclette").members[2].id] = -8.12
|
||||
# Since we're using floating point to store currency, we can have some rounding issues that prevent test from working.
|
||||
# However, we should obtain the same values as the theorical ones if we round to 2 decimals, like in the UI.
|
||||
# However, we should obtain the same values as the theorical ones if we
|
||||
# round to 2 decimals, like in the UI.
|
||||
for key, value in six.iteritems(balance):
|
||||
self.assertEqual(round(value, 2), result[key])
|
||||
|
||||
|
@ -805,6 +805,7 @@ class BudgetTestCase(TestCase):
|
|||
|
||||
|
||||
class APITestCase(TestCase):
|
||||
|
||||
"""Tests the API"""
|
||||
|
||||
def api_create(self, name, id=None, password=None, contact=None):
|
||||
|
@ -1162,7 +1163,9 @@ class APITestCase(TestCase):
|
|||
self.assertStatus(200, req)
|
||||
self.assertEqual(expected, json.loads(req.data.decode('utf-8')))
|
||||
|
||||
|
||||
class ServerTestCase(APITestCase):
|
||||
|
||||
def setUp(self):
|
||||
run.configure()
|
||||
super(ServerTestCase, self).setUp()
|
||||
|
|
Loading…
Reference in a new issue