Use activate instead of install for module activation
This commit is contained in:
@@ -8,25 +8,16 @@ Imports::
|
||||
>>> from dateutil.relativedelta import relativedelta
|
||||
>>> from decimal import Decimal
|
||||
>>> from proteus import config, Model, Wizard
|
||||
>>> from trytond.tests.tools import activate_modules
|
||||
>>> from trytond.modules.company.tests.tools import create_company, \
|
||||
... get_company
|
||||
>>> from trytond.modules.account.tests.tools import create_fiscalyear, \
|
||||
... create_chart, get_accounts
|
||||
>>> today = datetime.date.today()
|
||||
|
||||
Create database::
|
||||
|
||||
>>> config = config.set_trytond()
|
||||
>>> config.pool.test = True
|
||||
|
||||
Install account_dunning_letter::
|
||||
|
||||
>>> Module = Model.get('ir.module')
|
||||
>>> module, = Module.find([
|
||||
... ('name', '=', 'account_dunning_letter'),
|
||||
... ])
|
||||
>>> module.click('install')
|
||||
>>> Wizard('ir.module.install_upgrade').execute('upgrade')
|
||||
>>> config = activate_modules('account_dunning_letter')
|
||||
|
||||
Create company::
|
||||
|
||||
|
||||
@@ -4,8 +4,7 @@ import unittest
|
||||
import doctest
|
||||
import trytond.tests.test_tryton
|
||||
from trytond.tests.test_tryton import ModuleTestCase
|
||||
from trytond.tests.test_tryton import doctest_setup, doctest_teardown
|
||||
from trytond.tests.test_tryton import doctest_checker
|
||||
from trytond.tests.test_tryton import doctest_teardown, doctest_checker
|
||||
|
||||
|
||||
class AccountDunningLetterTestCase(ModuleTestCase):
|
||||
@@ -18,7 +17,7 @@ def suite():
|
||||
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
|
||||
AccountDunningLetterTestCase))
|
||||
suite.addTests(doctest.DocFileSuite('scenario_account_dunning_letter.rst',
|
||||
setUp=doctest_setup, tearDown=doctest_teardown, encoding='utf-8',
|
||||
tearDown=doctest_teardown, encoding='utf-8',
|
||||
checker=doctest_checker,
|
||||
optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
|
||||
return suite
|
||||
|
||||
Reference in New Issue
Block a user