diff options
Diffstat (limited to 'test-cli/test/helpers/psqldb.py')
-rw-r--r-- | test-cli/test/helpers/psqldb.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test-cli/test/helpers/psqldb.py b/test-cli/test/helpers/psqldb.py index af08579..26dd03d 100644 --- a/test-cli/test/helpers/psqldb.py +++ b/test-cli/test/helpers/psqldb.py @@ -7,21 +7,21 @@ class PgSQLConnection(object): __db_config = {'dbname': 'testsrv', 'host': '192.168.2.171', 'password': 'Idkfa2009', 'port': 5432, 'user': 'admin'} - def __init__ (self, connect_str = None): - self.__conection_object = None - if connect_str is not None: - self.__db_config = connect_str - else: - self.__db_config = {'dbname': 'testsrv', 'host': '192.168.2.171', - 'password': 'Idkfa2009', 'port': 5432, 'user': 'admin'} - - def db_connect (self, connect_str = None): + def __init__ (self): +# self.__conection_object = None +# if connect_str is not None: +# self.__db_config = connect_str +# else: + self.__db_config = {'dbname': 'testsrv', 'host': '192.168.2.171', + 'password': 'Idkfa2009', 'port': 5432, 'user': 'admin'} + + def db_connect (self, connect_str): result = False try: if connect_str == None: self.__conection_object = psycopg2.connect(**self.__db_config) else: - __db_config = connect_str; + self.__db_config = connect_str; self.__conection_object = psycopg2.connect(**self.__db_config) self.__conection_object.autocommit = True result = True |