Use install_modules tools in scenario
issue5794
This commit is contained in:
1 parent
0a49ad3c23
commit
c549d797bd
2 files changed
+5
-14
No files matched your search
@@ -6,7 +6,8 @@ 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_chart, \
|
||||
@@ -14,19 +15,9 @@ Imports::
|
||||
>>> from trytond.modules.account_invoice.tests.tools import \
|
||||
... create_payment_term
|
||||
|
||||
Configure::
|
||||
|
||||
>>> config = config.set_trytond()
|
||||
>>> config.pool.test = True
|
||||
|
||||
Install sale_promotion::
|
||||
|
||||
>>> Module = Model.get('ir.module')
|
||||
>>> module, = Module.find([
|
||||
... ('name', '=', 'sale_promotion'),
|
||||
... ])
|
||||
>>> module.click('install')
|
||||
>>> Wizard('ir.module.install_upgrade').execute('upgrade')
|
||||
>>> config = install_modules('sale_promotion')
|
||||
|
||||
Create company::
|
||||
|
||||
|
||||
@@ -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(
|
||||
SalePromotionTestCase))
|
||||
suite.addTests(doctest.DocFileSuite('scenario_sale_promotion.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