Run TestCases with different Users

How can we run testcases or rst file with diff users.

trytond.tests.tools provides the function set_user.

1 Like

Had tryton team has done it in any module.

https://hg.tryton.org/modules/account_dunning/file/default/tests/scenario_account_dunning.rst#l76

https://hg.tryton.org/modules/stock/file/tip/tests/scenario_stock_shipment_internal.rst#l71

https://hg.tryton.org/modules/stock_supply/file/default/tests/scenario_stock_supply_purchase_request.rst#l99

1 Like