fix tests

This commit is contained in:
Frederik Jaeckel 2023-06-02 21:08:56 +02:00
parent bbe71a8252
commit a5dd469cf3
7 changed files with 28 additions and 34 deletions

View file

@ -3,7 +3,7 @@
# The COPYRIGHT file at the top level of this repository contains the # The COPYRIGHT file at the top level of this repository contains the
# full copyright notices and license terms. # full copyright notices and license terms.
from trytond.tests.test_tryton import ModuleTestCase, with_transaction from trytond.tests.test_tryton import with_transaction
from trytond.pool import Pool from trytond.pool import Pool
from trytond.transaction import Transaction from trytond.transaction import Transaction
from trytond.exceptions import UserError from trytond.exceptions import UserError
@ -11,10 +11,9 @@ from datetime import date
from decimal import Decimal from decimal import Decimal
class BookTestCase(ModuleTestCase): class BookTestCase(object):
'Test cashbook book module' """ test cashbook
module = 'cashbook' """
def prep_sequence(self, name='Book Sequ'): def prep_sequence(self, name='Book Sequ'):
""" create numbering-equence """ create numbering-equence
""" """

View file

@ -3,7 +3,7 @@
# The COPYRIGHT file at the top level of this repository contains the # The COPYRIGHT file at the top level of this repository contains the
# full copyright notices and license terms. # full copyright notices and license terms.
from trytond.tests.test_tryton import ModuleTestCase, with_transaction from trytond.tests.test_tryton import with_transaction
from trytond.pool import Pool from trytond.pool import Pool
from trytond.transaction import Transaction from trytond.transaction import Transaction
from datetime import date from datetime import date
@ -11,10 +11,9 @@ from decimal import Decimal
from unittest.mock import MagicMock from unittest.mock import MagicMock
class BookingWizardTestCase(ModuleTestCase): class BookingWizardTestCase(object):
'Test cashbook booking wizard module' """ test booking wizard
module = 'cashbook' """
@with_transaction() @with_transaction()
def test_bookwiz_expense(self): def test_bookwiz_expense(self):
""" run booking-wizard to store expense """ run booking-wizard to store expense

View file

@ -3,16 +3,15 @@
# The COPYRIGHT file at the top level of this repository contains the # The COPYRIGHT file at the top level of this repository contains the
# full copyright notices and license terms. # full copyright notices and license terms.
from trytond.tests.test_tryton import ModuleTestCase, with_transaction from trytond.tests.test_tryton import with_transaction
from trytond.pool import Pool from trytond.pool import Pool
from trytond.transaction import Transaction from trytond.transaction import Transaction
from trytond.exceptions import UserError from trytond.exceptions import UserError
class CategoryTestCase(ModuleTestCase): class CategoryTestCase(object):
'Test cashbook categoy module' """ test category
module = 'cashbook' """
def prep_category(self, name='Cat1', cattype='out'): def prep_category(self, name='Cat1', cattype='out'):
""" create category """ create category
""" """

View file

@ -3,7 +3,7 @@
# The COPYRIGHT file at the top level of this repository contains the # The COPYRIGHT file at the top level of this repository contains the
# full copyright notices and license terms. # full copyright notices and license terms.
from trytond.tests.test_tryton import ModuleTestCase, with_transaction from trytond.tests.test_tryton import with_transaction
from trytond.pool import Pool from trytond.pool import Pool
from trytond.transaction import Transaction from trytond.transaction import Transaction
from trytond.modules.company.tests import create_company from trytond.modules.company.tests import create_company
@ -11,10 +11,9 @@ from datetime import date
from decimal import Decimal from decimal import Decimal
class ConfigTestCase(ModuleTestCase): class ConfigTestCase(object):
'Test config type module' """ test config
module = 'cashbook' """
def prep_company(self): def prep_company(self):
""" get/create company """ get/create company
""" """

View file

@ -3,7 +3,7 @@
# The COPYRIGHT file at the top level of this repository contains the # The COPYRIGHT file at the top level of this repository contains the
# full copyright notices and license terms. # full copyright notices and license terms.
from trytond.tests.test_tryton import ModuleTestCase, with_transaction from trytond.tests.test_tryton import with_transaction
from trytond.pool import Pool from trytond.pool import Pool
from trytond.modules.cashbook.model import CACHEKEY_CURRENCY, ENABLE_CACHE from trytond.modules.cashbook.model import CACHEKEY_CURRENCY, ENABLE_CACHE
from datetime import date from datetime import date
@ -11,10 +11,9 @@ from decimal import Decimal
import time import time
class CurrencyTestCase(ModuleTestCase): class CurrencyTestCase(object):
'Test cache for currency' """ test currency
module = 'cashbook' """
@with_transaction() @with_transaction()
def test_currency_update_cache(self): def test_currency_update_cache(self):
""" add/update/del rate of currency, check cache """ add/update/del rate of currency, check cache

View file

@ -3,17 +3,16 @@
# The COPYRIGHT file at the top level of this repository contains the # The COPYRIGHT file at the top level of this repository contains the
# full copyright notices and license terms. # full copyright notices and license terms.
from trytond.tests.test_tryton import ModuleTestCase, with_transaction from trytond.tests.test_tryton import with_transaction
from trytond.pool import Pool from trytond.pool import Pool
from trytond.exceptions import UserError from trytond.exceptions import UserError
from datetime import date from datetime import date
from decimal import Decimal from decimal import Decimal
class ReconTestCase(ModuleTestCase): class ReconTestCase(object):
'Test cashbook reconciliation module' """ test reconciliation
module = 'cashbook' """
@with_transaction() @with_transaction()
def test_recon_check_overlap_start(self): def test_recon_check_overlap_start(self):
""" create, check deny of overlap date - date_from """ create, check deny of overlap date - date_from

View file

@ -3,15 +3,15 @@
# The COPYRIGHT file at the top level of this repository contains the # The COPYRIGHT file at the top level of this repository contains the
# full copyright notices and license terms. # full copyright notices and license terms.
from trytond.tests.test_tryton import ModuleTestCase, with_transaction from trytond.tests.test_tryton import with_transaction
from trytond.pool import Pool from trytond.pool import Pool
from datetime import date from datetime import date
from decimal import Decimal from decimal import Decimal
class SplitLineTestCase(ModuleTestCase): class SplitLineTestCase(object):
'Test split line module' """ test split lines
module = 'cashbook' """
@with_transaction() @with_transaction()
def test_splitline_in_category(self): def test_splitline_in_category(self):