Use activate instead of install for module activation

This commit is contained in:
Nicolas Évrard committed 2016-10-21 15:25:31 +02:00
1 parent e485ff3137
commit 70ce0ff3bc
2 files changed
+4 -14

No files matched your search

+2 -11
View File
@@ -7,25 +7,16 @@ Imports::
>>> import datetime
>>> 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 a database::
>>> config = config.set_trytond()
>>> config.pool.test = True
Install account_dunning_fee::
>>> Module = Model.get('ir.module')
>>> module, = Module.find([
... ('name', '=', 'account_dunning_fee'),
... ])
>>> module.click('install')
>>> Wizard('ir.module.install_upgrade').execute('upgrade')
>>> config = activate_modules('account_dunning_fee')
Create company::
+2 -3
View File
@@ -7,8 +7,7 @@ import doctest
from trytond.tests.test_tryton import ModuleTestCase
from trytond.tests.test_tryton import suite as test_suite
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 AccountDunningFeeTestCase(ModuleTestCase):
@@ -22,7 +21,7 @@ def suite():
AccountDunningFeeTestCase))
suite.addTests(doctest.DocFileSuite(
'scenario_account_dunning_fee.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