[FIX] add JS test integration with unittest/runbot runner
bzr revid: xmo@openerp.com-20121030132106-gggi4vmwjwq4l2mj
This commit is contained in:
parent
f24cbe0795
commit
5040c649c4
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from . import test_dataset, test_menu, test_serving_base, test_view
|
||||
from . import test_dataset, test_menu, test_serving_base, test_view, test_js
|
||||
|
||||
fast_suite = []
|
||||
checks = [
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
import urlparse
|
||||
from openerp import sql_db, tools
|
||||
from qunitsuite.suite import QUnitSuite
|
||||
|
||||
class WebSuite(QUnitSuite):
|
||||
def __init__(self):
|
||||
url = urlparse.urlunsplit([
|
||||
'http',
|
||||
'localhost:{port}'.format(port=tools.config['xmlrpc_port']),
|
||||
'/web/tests',
|
||||
'mod=*&source={db}&supadmin={supadmin}&password={password}'.format(
|
||||
db=tools.config['db_name'],
|
||||
supadmin=tools.config['db_password'] or 'admin',
|
||||
password=tools.config['admin_passwd'] or 'admin'),
|
||||
''
|
||||
])
|
||||
super(WebSuite, self).__init__(url, 20000)
|
||||
def run(self, result):
|
||||
if sql_db._Pool is not None:
|
||||
sql_db._Pool.close_all(sql_db.dsn(tools.config['db_name']))
|
||||
return super(WebSuite, self).run(result)
|
||||
|
||||
def load_tests(loader, standard_tests, _):
|
||||
standard_tests.addTest(WebSuite())
|
||||
return standard_tests
|
Loading…
Reference in New Issue