tests/testpgmanager.py
changeset 49 08e4dfe1b0cb
parent 48 b82c7c2fb5af
--- a/tests/testpgmanager.py	Sat Sep 29 12:08:47 2012 +0200
+++ b/tests/testpgmanager.py	Sat Sep 29 13:53:54 2012 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3.2
+#!/usr/bin/env python3
 
 from tests.config import Config
 from pgtoolkit import pgmanager
@@ -9,10 +9,11 @@
 class TestSuite(unittest.TestCase):
 
     def setUp(self):
-        cfg = Config('tests.conf')
+        cfg = Config('pgtoolkit.conf')
+        test_db_conn_params = cfg['databases']['test']
         self.m = pgmanager.get_instance()
-        self.m.create_conn(**cfg)
-        self.m.create_conn('autocommit', isolation_level='autocommit', **cfg)
+        self.m.create_conn(dsn=test_db_conn_params)
+        self.m.create_conn('autocommit', isolation_level='autocommit', dsn=test_db_conn_params)
 
     def tearDown(self):
         self.m.destroy_conn()
@@ -48,6 +49,7 @@
         self.assertTrue(curs.rowcount == 1)
         self.m.put_conn(conn)
 
+
 if __name__ == '__main__':
     unittest.main()