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:
|
Returns:
|
||||||
|
|
||||||
"""
|
"""
|
||||||
self.conn.execute_void("END;")
|
SQL = "END;"
|
||||||
|
self.conn.execute_scalar(SQL)
|
||||||
|
|
||||||
@check_precondition
|
@check_precondition
|
||||||
def list(self, gid, sid, did, scid, tid, cid=None):
|
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'] == "":
|
if 'name' not in data or data['name'] == "":
|
||||||
sql = "BEGIN;"
|
sql = "BEGIN;"
|
||||||
# Start transaction.
|
# Start transaction.
|
||||||
status, res = self.conn.execute_void(sql)
|
status, res = self.conn.execute_scalar(sql)
|
||||||
if not status:
|
if not status:
|
||||||
self.conn.execute_void('ROLLBACK;')
|
|
||||||
self.end_transaction()
|
self.end_transaction()
|
||||||
return internal_server_error(errormsg=res)
|
return internal_server_error(errormsg=res)
|
||||||
|
|
||||||
@ -549,7 +549,6 @@ class CheckConstraintView(PGChildNodeView):
|
|||||||
|
|
||||||
status, msg = self.conn.execute_scalar(sql)
|
status, msg = self.conn.execute_scalar(sql)
|
||||||
if not status:
|
if not status:
|
||||||
self.conn.execute_void('ROLLBACK;')
|
|
||||||
self.end_transaction()
|
self.end_transaction()
|
||||||
return internal_server_error(errormsg=msg)
|
return internal_server_error(errormsg=msg)
|
||||||
|
|
||||||
@ -562,7 +561,6 @@ class CheckConstraintView(PGChildNodeView):
|
|||||||
|
|
||||||
status, res = self.conn.execute_dict(sql)
|
status, res = self.conn.execute_dict(sql)
|
||||||
if not status:
|
if not status:
|
||||||
self.conn.execute_void('ROLLBACK;')
|
|
||||||
self.end_transaction()
|
self.end_transaction()
|
||||||
return internal_server_error(errormsg=res)
|
return internal_server_error(errormsg=res)
|
||||||
|
|
||||||
@ -578,7 +576,6 @@ class CheckConstraintView(PGChildNodeView):
|
|||||||
)
|
)
|
||||||
status, res = self.conn.execute_dict(sql)
|
status, res = self.conn.execute_dict(sql)
|
||||||
if not status:
|
if not status:
|
||||||
self.conn.execute_void('ROLLBACK;')
|
|
||||||
self.end_transaction()
|
self.end_transaction()
|
||||||
return internal_server_error(errormsg=res)
|
return internal_server_error(errormsg=res)
|
||||||
|
|
||||||
@ -595,7 +592,6 @@ class CheckConstraintView(PGChildNodeView):
|
|||||||
)
|
)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.conn.execute_void('ROLLBACK;')
|
|
||||||
self.end_transaction()
|
self.end_transaction()
|
||||||
return make_json_response(
|
return make_json_response(
|
||||||
status=400,
|
status=400,
|
||||||
|
@ -469,7 +469,7 @@
|
|||||||
},
|
},
|
||||||
"mocking_required": true,
|
"mocking_required": true,
|
||||||
"mock_data": {
|
"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')"
|
"return_value": "(False,'Mocked Internal Server Error')"
|
||||||
},
|
},
|
||||||
"expected_data": {
|
"expected_data": {
|
||||||
@ -547,7 +547,7 @@
|
|||||||
"test_data": {},
|
"test_data": {},
|
||||||
"mocking_required": true,
|
"mocking_required": true,
|
||||||
"mock_data": {
|
"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')"
|
"return_value": "(False,'Mocked Internal Server Error')"
|
||||||
},
|
},
|
||||||
"expected_data": {
|
"expected_data": {
|
||||||
|
Loading…
Reference in New Issue
Block a user