Files
odoo_source/addons/website_crm/tests/test_website_crm.py
T
Raphael Collet 7ea4f13f16 [REF] tests: TestCursor is now a proxy to a real Cursor
This allows rpc requests in `HttpCase` to use the cursor `self.cr`, which is
now shared between the Python test and the rpc requests.  This simplifies code
to prepare a JS test, and code to check the result of a JS tour.

Fixes #12237
2018-02-12 10:31:59 +01:00

19 lines
745 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.phantom_js("/", "odoo.__DEBUG__.services['web_tour.tour'].run('website_crm_tour')", "odoo.__DEBUG__.services['web_tour.tour'].tours.website_crm_tour.ready")
# 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.')