mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Revert "Fixed API test cases for PG/EPAS 9.6" per Khushboo.
This reverts commit 37278f2cd3
.
This commit is contained in:
parent
37278f2cd3
commit
4e067835c3
@ -228,7 +228,8 @@ class CheckConstraintView(PGChildNodeView):
|
||||
Returns:
|
||||
|
||||
"""
|
||||
self.conn.execute_void("END;")
|
||||
SQL = "END;"
|
||||
self.conn.execute_scalar(SQL)
|
||||
|
||||
@check_precondition
|
||||
def list(self, gid, sid, did, scid, tid, cid=None):
|
||||
@ -535,9 +536,8 @@ class CheckConstraintView(PGChildNodeView):
|
||||
if 'name' not in data or data['name'] == "":
|
||||
sql = "BEGIN;"
|
||||
# Start transaction.
|
||||
status, res = self.conn.execute_void(sql)
|
||||
status, res = self.conn.execute_scalar(sql)
|
||||
if not status:
|
||||
self.conn.execute_void('ROLLBACK;')
|
||||
self.end_transaction()
|
||||
return internal_server_error(errormsg=res)
|
||||
|
||||
@ -549,7 +549,6 @@ class CheckConstraintView(PGChildNodeView):
|
||||
|
||||
status, msg = self.conn.execute_scalar(sql)
|
||||
if not status:
|
||||
self.conn.execute_void('ROLLBACK;')
|
||||
self.end_transaction()
|
||||
return internal_server_error(errormsg=msg)
|
||||
|
||||
@ -562,7 +561,6 @@ class CheckConstraintView(PGChildNodeView):
|
||||
|
||||
status, res = self.conn.execute_dict(sql)
|
||||
if not status:
|
||||
self.conn.execute_void('ROLLBACK;')
|
||||
self.end_transaction()
|
||||
return internal_server_error(errormsg=res)
|
||||
|
||||
@ -578,7 +576,6 @@ class CheckConstraintView(PGChildNodeView):
|
||||
)
|
||||
status, res = self.conn.execute_dict(sql)
|
||||
if not status:
|
||||
self.conn.execute_void('ROLLBACK;')
|
||||
self.end_transaction()
|
||||
return internal_server_error(errormsg=res)
|
||||
|
||||
@ -595,7 +592,6 @@ class CheckConstraintView(PGChildNodeView):
|
||||
)
|
||||
|
||||
except Exception as e:
|
||||
self.conn.execute_void('ROLLBACK;')
|
||||
self.end_transaction()
|
||||
return make_json_response(
|
||||
status=400,
|
||||
|
@ -469,7 +469,7 @@
|
||||
},
|
||||
"mocking_required": true,
|
||||
"mock_data": {
|
||||
"function_name": "pgadmin.utils.driver.psycopg2.connection.Connection.execute_void",
|
||||
"function_name": "pgadmin.utils.driver.psycopg2.connection.Connection.execute_scalar",
|
||||
"return_value": "(False,'Mocked Internal Server Error')"
|
||||
},
|
||||
"expected_data": {
|
||||
@ -547,7 +547,7 @@
|
||||
"test_data": {},
|
||||
"mocking_required": true,
|
||||
"mock_data": {
|
||||
"function_name": "pgadmin.utils.driver.psycopg2.connection.Connection.execute_void",
|
||||
"function_name": "pgadmin.utils.driver.psycopg2.connection.Connection.execute_scalar",
|
||||
"return_value": "(False,'Mocked Internal Server Error')"
|
||||
},
|
||||
"expected_data": {
|
||||
|
Loading…
Reference in New Issue
Block a user