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.

31 lines
1.3 KiB

  1. # Copyright 2018 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
  2. # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
  3. import odoo.tests
  4. from odoo.api import Environment
  5. @odoo.tests.common.at_install(True)
  6. @odoo.tests.common.post_install(True)
  7. class TestUi(odoo.tests.HttpCase):
  8. def test_01_mail_private(self):
  9. # needed because tests are run before the module is marked as
  10. # installed. In js web will only load qweb coming from modules
  11. # that are returned by the backend in module_boot. Without
  12. # this you end up with js, css but no qweb.
  13. cr = self.registry.cursor()
  14. env = Environment(cr, self.uid, {})
  15. env['ir.module.module'].search([('name', '=', 'mail_private')], limit=1).state = 'installed'
  16. cr.release()
  17. env = Environment(self.registry.test_cr, self.uid, {})
  18. partners = env['res.partner'].search([])
  19. new_follower = env['res.partner'].search([('name', 'ilike', 'Ja')])
  20. for partner in partners:
  21. partner.message_subscribe(new_follower.ids, [])
  22. self.phantom_js("/web",
  23. "odoo.__DEBUG__.services['web_tour.tour'].run('mail_private_tour', 1000)",
  24. "odoo.__DEBUG__.services['web_tour.tour'].tours.mail_private_tour.ready",
  25. login="admin", timeout=90)