From d6a46054fa07577396df8f0b96e602ea15d55eef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 2 Aug 2017 19:38:21 +0200 Subject: [PATCH] Add set_user tools for test scenario When changing the user of proteus, the context should be reloaded. issue6652 review42551002 --- tests/scenario_purchase_invoice_line_standalone.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/scenario_purchase_invoice_line_standalone.rst b/tests/scenario_purchase_invoice_line_standalone.rst index 4e0668997a..c272cd55c3 100644 --- a/tests/scenario_purchase_invoice_line_standalone.rst +++ b/tests/scenario_purchase_invoice_line_standalone.rst @@ -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')])