Add set_user tools for test scenario

When changing the user of proteus, the context should be reloaded.

issue6652
review42551002
This commit is contained in:
Cédric Krier
2017-08-02 19:38:21 +02:00
parent a6a07360db
commit d6a46054fa
@@ -9,7 +9,7 @@ Imports::
>>> from decimal import Decimal
>>> from operator import attrgetter
>>> from proteus import Model, Wizard
>>> from trytond.tests.tools import activate_modules
>>> from trytond.tests.tools import activate_modules, set_user
>>> from trytond.modules.company.tests.tools import create_company, \
... get_company
>>> from trytond.modules.account.tests.tools import create_fiscalyear, \
@@ -140,7 +140,7 @@ Create a supplier invoice::
Create a supplier invoice with an accountant::
>>> current_config.user = accountant.id
>>> set_user(accountant)
>>> Invoice = Model.get('account.invoice')
>>> Partner = Model.get('party.party')
>>> supplier, = Partner.find([('name', '=', 'Supplier')])