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