You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
797 B

5 years ago
  1. # Copyright 2019 Coop IT Easy SCRL fs
  2. # Robin Keunen <robin@coopiteasy.be>
  3. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
  4. import odoo.tests.common as common
  5. class EMCBaseCase(common.TransactionCase):
  6. def setUp(self):
  7. super(EMCBaseCase, self).setUp()
  8. # todo set from demo data
  9. user = self.env["res.users"].browse(self.uid)
  10. cooperator_account = self.ref("easy_my_coop.account_cooperator_demo")
  11. user.company_id.property_cooperator_account = cooperator_account
  12. def as_user(self):
  13. self.uid = self.ref("base.user_demo")
  14. def as_emc_user(self):
  15. self.uid = self.ref("easy_my_coop.res_users_user_emc_demo")
  16. def as_emc_manager(self):
  17. self.uid = self.ref("easy_my_coop.res_users_manager_emc_demo")