[FIX] gamification: correct name of ir.rule fixing bad copy-paste
[odoo/odoo.git] / openerpcommand / run_tests.py
index fbcbfa3..7e23f3e 100644 (file)
@@ -101,17 +101,19 @@ def run(args):
     import openerp
 
     config = openerp.tools.config
+    config.load()
+
     config['db_name'] = args.database
     if args.port:
         config['xmlrpc_port'] = int(args.port)
-    config['admin_passwd'] = 'admin'
-    config['db_password'] = 'a2aevl8w' # TODO from .openerpserverrc
 
     if args.addons:
         args.addons = args.addons.replace(':',',').split(',')
     else:
         args.addons = []
 
+    # ensure no duplication in addons paths
+    args.addons = list(set(args.addons))
     config['addons_path'] = ','.join(args.addons)
 
     import logging
@@ -139,6 +141,7 @@ def run(args):
     for test_module in test_modules:
         print '    ', test_module.__name__
     print
+    sys.stdout.flush()
 
     if not args.dry_run:
         suite = unittest2.TestSuite()