summaryrefslogtreecommitdiff
path: root/test-cli/test/helpers/psqldb.py
diff options
context:
space:
mode:
authorManel Caro <mcaro@iseebcn.com>2019-03-09 21:38:10 +0100
committerManel Caro <mcaro@iseebcn.com>2019-03-09 21:38:10 +0100
commitfa1e1822769d735745869ef02671408d006f2b13 (patch)
treeed36d7f424d7535eff2bf5d089847dc1fe3a31be /test-cli/test/helpers/psqldb.py
parente4366bb1f2dc3a43a1289f6f76967f1005278954 (diff)
downloadboard-fa1e1822769d735745869ef02671408d006f2b13.zip
board-fa1e1822769d735745869ef02671408d006f2b13.tar.gz
board-fa1e1822769d735745869ef02671408d006f2b13.tar.bz2
Change some test
Update some tests
Diffstat (limited to 'test-cli/test/helpers/psqldb.py')
-rw-r--r--test-cli/test/helpers/psqldb.py20
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