Files
odoo_source/addons/website_crm/tests/test_website_crm.py
T
Sébastien Theys df7326f0be [IMP] tests, *: add start_tour helper
Before this commit, the syntax to start a tour was extremely verbose.
With this new method, it is possible to start a tour by just giving the
essential parameter: the tour name.
The full set of features from browser_js are kept by using **kwargs.

closes odoo/odoo#32316

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-04-04 08:44:59 +00:00

19 lines
624 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import odoo.tests
@odoo.tests.tagged('post_install', '-at_install')
class TestWebsiteCrm(odoo.tests.HttpCase):
def test_tour(self):
self.start_tour("/", 'website_crm_tour')
# check result
record = self.env['crm.lead'].search([('description', '=', '### TOUR DATA ###')])
self.assertEqual(len(record), 1)
self.assertEqual(record.contact_name, 'John Smith')
self.assertEqual(record.email_from, 'john@smith.com')
self.assertEqual(record.partner_name, 'Odoo S.A.')