[devtools/testlib] Use actual 'admin' user configuration values
authorDenis Laxalde <denis.laxalde@logilab.fr>
Mon, 30 Jun 2014 10:49:53 +0200
changeset 10017 58c7a075c793
parent 10016 984505da8b89
child 10018 72f3249b2f7d
[devtools/testlib] Use actual 'admin' user configuration values Previously ``db-user`` and ``db-password`` configuration values were used to fill ``admlogin`` and `admpassword`` attributes of CubicWebTC. The correct data for these should read from `[admin]` section. Closes #4065070.
devtools/testlib.py
--- a/devtools/testlib.py	Thu Apr 25 10:16:25 2013 +0200
+++ b/devtools/testlib.py	Mon Jun 30 10:49:53 2014 +0200
@@ -513,9 +513,9 @@
         This method will be called by the database handler once the config has
         been properly bootstrapped.
         """
-        source = config.system_source_config
-        cls.admlogin = unicode(source['db-user'])
-        cls.admpassword = source['db-password']
+        admincfg = config.default_admin_config
+        cls.admlogin = unicode(admincfg['login'])
+        cls.admpassword = admincfg['password']
         # uncomment the line below if you want rql queries to be logged
         #config.global_set_option('query-log-file',
         #                         '/tmp/test_rql_log.' + `os.getpid()`)