forked from DGNum/gestioCOF
core -- Apply black + isort to all files
This commit is contained in:
parent
104e71dcf6
commit
fdd2b35289
196 changed files with 10727 additions and 8365 deletions
|
@ -1,10 +1,9 @@
|
|||
from decimal import Decimal
|
||||
|
||||
import djconfig
|
||||
from django.test import TestCase
|
||||
from django.utils import timezone
|
||||
|
||||
import djconfig
|
||||
|
||||
from gestioncof.models import User
|
||||
from kfet.config import kfet_config
|
||||
from kfet.models import Account
|
||||
|
@ -18,18 +17,18 @@ class ConfigTest(TestCase):
|
|||
djconfig.reload_maybe()
|
||||
|
||||
def test_get(self):
|
||||
self.assertTrue(hasattr(kfet_config, 'subvention_cof'))
|
||||
self.assertTrue(hasattr(kfet_config, "subvention_cof"))
|
||||
|
||||
def test_subvention_cof(self):
|
||||
reduction_cof = Decimal('20')
|
||||
subvention_cof = Decimal('25')
|
||||
reduction_cof = Decimal("20")
|
||||
subvention_cof = Decimal("25")
|
||||
kfet_config.set(reduction_cof=reduction_cof)
|
||||
|
||||
self.assertEqual(kfet_config.subvention_cof, subvention_cof)
|
||||
|
||||
def test_set_decimal(self):
|
||||
"""Test field of decimal type."""
|
||||
reduction_cof = Decimal('10')
|
||||
reduction_cof = Decimal("10")
|
||||
# IUT
|
||||
kfet_config.set(reduction_cof=reduction_cof)
|
||||
# check
|
||||
|
@ -37,9 +36,8 @@ class ConfigTest(TestCase):
|
|||
|
||||
def test_set_modelinstance(self):
|
||||
"""Test field of model instance type."""
|
||||
user = User.objects.create(username='foo_user')
|
||||
account = Account.objects.create(trigramme='FOO',
|
||||
cofprofile=user.profile)
|
||||
user = User.objects.create(username="foo_user")
|
||||
account = Account.objects.create(trigramme="FOO", cofprofile=user.profile)
|
||||
# IUT
|
||||
kfet_config.set(addcost_for=account)
|
||||
# check
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue