mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-04-28 17:32:38 +02:00
black formatting, since last black changed
This commit is contained in:
parent
e03338e6a8
commit
923a7c41c1
8 changed files with 3 additions and 14 deletions
|
@ -111,7 +111,7 @@ def get_history(project, human_readable_names=True):
|
|||
):
|
||||
del changeset["converted_amount"]
|
||||
|
||||
for (prop, (val_before, val_after)) in changeset.items():
|
||||
for prop, (val_before, val_after) in changeset.items():
|
||||
if human_readable_names:
|
||||
if prop == "payer_id":
|
||||
prop = "payer"
|
||||
|
|
|
@ -537,7 +537,7 @@ class Project(db.Model):
|
|||
("Alice", 20, ("Amina", "Alice"), "Beer !"),
|
||||
("Amina", 50, ("Amina", "Alice", "Georg"), "AMAP"),
|
||||
)
|
||||
for (payer, amount, owers, what) in operations:
|
||||
for payer, amount, owers, what in operations:
|
||||
db.session.add(
|
||||
Bill(
|
||||
amount=amount,
|
||||
|
|
|
@ -86,7 +86,6 @@ def load_configuration(app, configuration=None):
|
|||
|
||||
|
||||
def validate_configuration(app):
|
||||
|
||||
if app.config["SECRET_KEY"] == default_settings.SECRET_KEY:
|
||||
warnings.warn(
|
||||
"Running a server without changing the SECRET_KEY can lead to"
|
||||
|
|
|
@ -101,7 +101,6 @@ class APITestCase(IhatemoneyTestCase):
|
|||
|
||||
# create it
|
||||
with self.app.mail.record_messages() as outbox:
|
||||
|
||||
resp = self.api_create("raclette")
|
||||
self.assertTrue(201, resp.status_code)
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@ class BudgetTestCase(IhatemoneyTestCase):
|
|||
"""
|
||||
# sending a message to one person
|
||||
with self.app.mail.record_messages() as outbox:
|
||||
|
||||
# create a project
|
||||
self.login("raclette")
|
||||
|
||||
|
@ -316,7 +315,6 @@ class BudgetTestCase(IhatemoneyTestCase):
|
|||
self.assertEqual(len(models.Project.query.all()), 1)
|
||||
|
||||
def test_project_deletion(self):
|
||||
|
||||
with self.client as c:
|
||||
c.post(
|
||||
"/create",
|
||||
|
@ -1365,7 +1363,6 @@ class BudgetTestCase(IhatemoneyTestCase):
|
|||
self.assertEqual(member, None)
|
||||
|
||||
def test_currency_switch(self):
|
||||
|
||||
# A project should be editable
|
||||
self.post_project("raclette")
|
||||
|
||||
|
@ -1492,7 +1489,6 @@ class BudgetTestCase(IhatemoneyTestCase):
|
|||
self.assertEqual(self.get_project("raclette").default_currency, "USD")
|
||||
|
||||
def test_currency_switch_to_bill_currency(self):
|
||||
|
||||
# Default currency is 'XXX', but we should start from a project with a currency
|
||||
self.post_project("raclette", default_currency="USD")
|
||||
|
||||
|
@ -1526,7 +1522,6 @@ class BudgetTestCase(IhatemoneyTestCase):
|
|||
assert bill.converted_amount == bill.amount
|
||||
|
||||
def test_currency_switch_to_no_currency(self):
|
||||
|
||||
# Default currency is 'XXX', but we should start from a project with a currency
|
||||
self.post_project("raclette", default_currency="USD")
|
||||
|
||||
|
@ -1598,7 +1593,6 @@ class BudgetTestCase(IhatemoneyTestCase):
|
|||
assert "No bills" in resp.data.decode("utf-8")
|
||||
|
||||
def test_decimals_on_weighted_members_list(self):
|
||||
|
||||
self.post_project("raclette")
|
||||
|
||||
# add three users with different weights
|
||||
|
|
|
@ -10,7 +10,6 @@ from ihatemoney.run import create_app, db
|
|||
|
||||
|
||||
class BaseTestCase(TestCase):
|
||||
|
||||
SECRET_KEY = "TEST SESSION"
|
||||
SQLALCHEMY_DATABASE_URI = os.environ.get(
|
||||
"TESTING_SQLALCHEMY_DATABASE_URI", "sqlite://"
|
||||
|
|
|
@ -473,7 +473,6 @@ class HistoryTestCase(IhatemoneyTestCase):
|
|||
)
|
||||
|
||||
def test_double_bill_double_person_edit_second(self):
|
||||
|
||||
# add two members
|
||||
self.client.post("/demo/members/add", data={"name": "User 1"})
|
||||
self.client.post("/demo/members/add", data={"name": "User 2"})
|
||||
|
|
|
@ -153,7 +153,7 @@ class ModelsTestCase(IhatemoneyTestCase):
|
|||
},
|
||||
)
|
||||
project = models.Project.query.get_by_name(name="raclette")
|
||||
for (weight, bill) in project.get_bill_weights().all():
|
||||
for weight, bill in project.get_bill_weights().all():
|
||||
if bill.what == "red wine":
|
||||
pay_each_expected = 20 / 2
|
||||
self.assertEqual(bill.amount / weight, pay_each_expected)
|
||||
|
@ -165,7 +165,6 @@ class ModelsTestCase(IhatemoneyTestCase):
|
|||
self.assertEqual(bill.amount / weight, pay_each_expected)
|
||||
|
||||
def test_bill_pay_each(self):
|
||||
|
||||
self.post_project("raclette")
|
||||
|
||||
# add members
|
||||
|
|
Loading…
Reference in a new issue