Use install_modules tools in scenario

issue5794
This commit is contained in:
Cédric Krier
2016-08-26 09:58:22 +02:00
parent a973b18492
commit b53c5c706b
2 changed files with 5 additions and 13 deletions
+3 -11
View File
@@ -5,24 +5,16 @@ Payment Scenario
Imports::
>>> import datetime
>>> from decimal import Decimal
>>> from proteus import config, Model, Wizard
>>> from proteus import Model, Wizard
>>> from trytond.tests.tools import install_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
Create database::
>>> config = config.set_trytond()
>>> config.pool.test = True
Install account_payment::
>>> Module = Model.get('ir.module')
>>> account_payment_module, = Module.find(
... [('name', '=', 'account_payment')])
>>> account_payment_module.click('install')
>>> Wizard('ir.module.install_upgrade').execute('upgrade')
>>> config = install_modules('account_payment')
Create company::
+2 -2
View File
@@ -4,7 +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_teardown
from trytond.tests.test_tryton import doctest_checker
@@ -18,7 +18,7 @@ def suite():
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
AccountPaymentTestCase))
suite.addTests(doctest.DocFileSuite('scenario_account_payment.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