Files
odoo_source/addons/web/tests/test_js.py
T
Xavier Morel d27526d088 [IMP] JS unit tests
split automated suite so web only runs its own JS tests, and web_tests_demo runs its own.

Also reversed changes to index.

todo: use hack cursor thing?

bzr revid: xmo@openerp.com-20140221124557-s875nj0xrf2t85i9
2014-02-21 13:45:57 +01:00

25 lines
735 B
Python

import urllib
import urlparse
from openerp import sql_db, tools
from qunitsuite.suite import QUnitSuite
class WebSuite(QUnitSuite):
def __init__(self, module):
url = urlparse.urlunsplit([
'http',
'localhost:{port}'.format(port=tools.config['xmlrpc_port']),
'/web/tests',
urllib.urlencode({
'mod': module,
'source': tools.config['db_name'],
'supadmin': tools.config['admin_passwd'],
'password': 'admin',
}),
''
])
super(WebSuite, self).__init__(url, 50000)
def load_tests(loader, standard_tests, _):
standard_tests.addTest(WebSuite('web'))
return standard_tests