Mas correciones menores para testing.

This commit is contained in:
pablomartincalvo 2018-11-04 19:52:47 +01:00
parent 94b604997c
commit 403bb2c0cc
4 changed files with 155 additions and 156 deletions

View file

@ -24,7 +24,7 @@ class DatabaseWrapper():
database = self.database,
user = self.user,
password = self.password,
autocommit = True)
autocommit = False)
def disconnect(self):
if self.connection.is_connected():
@ -38,8 +38,10 @@ class DatabaseWrapper():
self.connect()
if self.connection.is_connected():
try:
execution_cursor = self.connection.cursor(dictionary = dictionary)
execution_cursor = self.connection.cursor(dictionary=dictionary,
buffered=True)
execution_cursor.execute(query_statement, query_parameters)
self.connection.commit()
self.disconnect()
return execution_cursor
except Exception as e: