Updated the `test_server_registration` to load the db connection settings from
a configuration file.
---
 backend/server/test/unit-test/rhnSQL/test_server_registration.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/backend/server/test/unit-test/rhnSQL/test_server_registration.py 
b/backend/server/test/unit-test/rhnSQL/test_server_registration.py
index 10288de..169b9c2 100644
--- a/backend/server/test/unit-test/rhnSQL/test_server_registration.py
+++ b/backend/server/test/unit-test/rhnSQL/test_server_registration.py
@@ -25,8 +25,8 @@ from spacewalk.server import rhnSQL, rhnServer, rhnChannel
 from spacewalk.server.xmlrpc import registration
 
 import misc_functions
+DB_SETTINGS = misc_functions.db_settings("oracle")
 
-DB = 'rhnuser/rhnuser@webdev'
 
 
 class Tests(unittest.TestCase):
@@ -38,7 +38,12 @@ class Tests(unittest.TestCase):
 
     def setUp(self):
         initCFG("server.xmlrpc")
-        rhnSQL.initDB(DB)
+        rhnSQL.initDB(
+            backend  = "oracle",
+            username = DB_SETTINGS["user"],
+            password = DB_SETTINGS["password"],
+            database = DB_SETTINGS["database"]
+        )
 
     def tearDown(self):
         # Roll back any unsaved data
-- 
1.8.4

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to