2 from openerp import sql_db, tools
3 from qunitsuite.suite import QUnitSuite
5 class WebSuite(QUnitSuite):
7 url = urlparse.urlunsplit([
9 'localhost:{port}'.format(port=tools.config['xmlrpc_port']),
11 'mod=*&source={db}&supadmin={supadmin}&password={password}'.format(
12 db=tools.config['db_name'],
13 # al: i dont understand why both are needed, db_password is the
14 # password for postgres and should not appear here of that i'm
17 # But runbot provides it with this wrong key so i let it here
19 supadmin=tools.config['db_password'] or 'admin',
20 password=tools.config['admin_passwd'] or 'admin'),
23 super(WebSuite, self).__init__(url, 50000)
24 def run(self, result):
25 if sql_db._Pool is not None:
26 sql_db._Pool.close_all(sql_db.dsn(tools.config['db_name']))
27 return super(WebSuite, self).run(result)
29 def load_tests(loader, standard_tests, _):
30 standard_tests.addTest(WebSuite())