[MERGE] [FIX] export wizard: better behaviour when saving new fields list
[odoo/odoo.git] / addons / web / tests / test_js.py
1 import urlparse
2 from openerp import sql_db, tools
3 from qunitsuite.suite import QUnitSuite
4
5 class WebSuite(QUnitSuite):
6     def __init__(self):
7         url = urlparse.urlunsplit([
8             'http',
9             'localhost:{port}'.format(port=tools.config['xmlrpc_port']),
10             '/web/tests',
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
15                 # sure
16                 #
17                 # But runbot provides it with this wrong key so i let it here
18                 # until it's fixed
19                 supadmin=tools.config['db_password'] or 'admin',
20                 password=tools.config['admin_passwd'] or 'admin'),
21             ''
22         ])
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)
28
29 def load_tests(loader, standard_tests, _):
30     standard_tests.addTest(WebSuite())
31     return standard_tests