8 import openerp.addons.web.tests
10 _logger = logging.getLogger(__name__)
12 class TestJs(openerp.cli.Command):
14 self.parser = parser = optparse.OptionParser()
15 parser.add_option("-d", "--database", dest="db_name", default=False, help="specify the database name")
16 parser.add_option("--xmlrpc-port", dest="xmlrpc_port", default=8069, help="specify the TCP port for the XML-RPC protocol", type="int")
17 # proably need to add both --superadmin-password and --database-admin-password
18 self.parser.parse_args(args)
20 # test ony uses db_name xmlrpc_port admin_passwd, so use the server one for the actual parsing
22 config = openerp.tools.config
23 config.parse_config(args)
24 # needed until runbot is fixed
25 config['db_password'] = config['admin_passwd']
28 openerp.netsvc.init_alternative_logger()
29 suite = unittest2.TestSuite()
30 suite.addTests(unittest2.TestLoader().loadTestsFromModule(openerp.addons.web.tests.test_js))
31 r = unittest2.TextTestRunner(verbosity=2).run(suite)
32 if r.errors or r.failures: