Fix the Transaction Status failed test cases.
parent
f3e4721a90
commit
ed76787b76
|
@ -75,54 +75,54 @@ class TestTransactionControl(BaseTestGenerator):
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
)),
|
)),
|
||||||
# ('When auto-commit is disabled and save is successful', dict(
|
('When auto-commit is disabled and save is successful', dict(
|
||||||
# is_auto_commit_enabled=False,
|
is_auto_commit_enabled=False,
|
||||||
# transaction_status=TX_STATUS_INTRANS,
|
transaction_status=TX_STATUS_INTRANS,
|
||||||
# save_payload={
|
save_payload={
|
||||||
# "updated": {},
|
"updated": {},
|
||||||
# "added": {
|
"added": {
|
||||||
# "2": {
|
"2": {
|
||||||
# "err": False,
|
"err": False,
|
||||||
# "data": {
|
"data": {
|
||||||
# "pk_col": "3",
|
"pk_col": "3",
|
||||||
# "__temp_PK": "2",
|
"__temp_PK": "2",
|
||||||
# "normal_col": "three"
|
"normal_col": "three"
|
||||||
# }
|
}
|
||||||
# }
|
}
|
||||||
# },
|
},
|
||||||
# "staged_rows": {},
|
"staged_rows": {},
|
||||||
# "deleted": {},
|
"deleted": {},
|
||||||
# "updated_index": {},
|
"updated_index": {},
|
||||||
# "added_index": {"2": "2"},
|
"added_index": {"2": "2"},
|
||||||
# "columns": [
|
"columns": [
|
||||||
# {
|
{
|
||||||
# "name": "pk_col",
|
"name": "pk_col",
|
||||||
# "display_name": "pk_col",
|
"display_name": "pk_col",
|
||||||
# "column_type": "[PK] integer",
|
"column_type": "[PK] integer",
|
||||||
# "column_type_internal": "integer",
|
"column_type_internal": "integer",
|
||||||
# "pos": 0,
|
"pos": 0,
|
||||||
# "label": "pk_col<br>[PK] integer",
|
"label": "pk_col<br>[PK] integer",
|
||||||
# "cell": "number",
|
"cell": "number",
|
||||||
# "can_edit": True,
|
"can_edit": True,
|
||||||
# "type": "integer",
|
"type": "integer",
|
||||||
# "not_null": True,
|
"not_null": True,
|
||||||
# "has_default_val": False,
|
"has_default_val": False,
|
||||||
# "is_array": False},
|
"is_array": False},
|
||||||
# {"name": "normal_col",
|
{"name": "normal_col",
|
||||||
# "display_name": "normal_col",
|
"display_name": "normal_col",
|
||||||
# "column_type": "character varying",
|
"column_type": "character varying",
|
||||||
# "column_type_internal": "character varying",
|
"column_type_internal": "character varying",
|
||||||
# "pos": 1,
|
"pos": 1,
|
||||||
# "label": "normal_col<br>character varying",
|
"label": "normal_col<br>character varying",
|
||||||
# "cell": "string",
|
"cell": "string",
|
||||||
# "can_edit": True,
|
"can_edit": True,
|
||||||
# "type": "character varying",
|
"type": "character varying",
|
||||||
# "not_null": False,
|
"not_null": False,
|
||||||
# "has_default_val": False,
|
"has_default_val": False,
|
||||||
# "is_array": False}
|
"is_array": False}
|
||||||
# ]
|
]
|
||||||
# }
|
}
|
||||||
# )),
|
)),
|
||||||
('When auto-commit is enabled and save fails', dict(
|
('When auto-commit is enabled and save fails', dict(
|
||||||
is_auto_commit_enabled=True,
|
is_auto_commit_enabled=True,
|
||||||
transaction_status=TX_STATUS_IDLE,
|
transaction_status=TX_STATUS_IDLE,
|
||||||
|
@ -171,54 +171,54 @@ class TestTransactionControl(BaseTestGenerator):
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
)),
|
)),
|
||||||
# ('When auto-commit is disabled and save fails', dict(
|
('When auto-commit is disabled and save fails', dict(
|
||||||
# is_auto_commit_enabled=False,
|
is_auto_commit_enabled=False,
|
||||||
# transaction_status=TX_STATUS_INTRANS,
|
transaction_status=TX_STATUS_INTRANS,
|
||||||
# save_payload={
|
save_payload={
|
||||||
# "updated": {},
|
"updated": {},
|
||||||
# "added": {
|
"added": {
|
||||||
# "2": {
|
"2": {
|
||||||
# "err": False,
|
"err": False,
|
||||||
# "data": {
|
"data": {
|
||||||
# "pk_col": "1",
|
"pk_col": "1",
|
||||||
# "__temp_PK": "2",
|
"__temp_PK": "2",
|
||||||
# "normal_col": "four"
|
"normal_col": "four"
|
||||||
# }
|
}
|
||||||
# }
|
}
|
||||||
# },
|
},
|
||||||
# "staged_rows": {},
|
"staged_rows": {},
|
||||||
# "deleted": {},
|
"deleted": {},
|
||||||
# "updated_index": {},
|
"updated_index": {},
|
||||||
# "added_index": {"2": "2"},
|
"added_index": {"2": "2"},
|
||||||
# "columns": [
|
"columns": [
|
||||||
# {
|
{
|
||||||
# "name": "pk_col",
|
"name": "pk_col",
|
||||||
# "display_name": "pk_col",
|
"display_name": "pk_col",
|
||||||
# "column_type": "[PK] integer",
|
"column_type": "[PK] integer",
|
||||||
# "column_type_internal": "integer",
|
"column_type_internal": "integer",
|
||||||
# "pos": 0,
|
"pos": 0,
|
||||||
# "label": "pk_col<br>[PK] integer",
|
"label": "pk_col<br>[PK] integer",
|
||||||
# "cell": "number",
|
"cell": "number",
|
||||||
# "can_edit": True,
|
"can_edit": True,
|
||||||
# "type": "integer",
|
"type": "integer",
|
||||||
# "not_null": True,
|
"not_null": True,
|
||||||
# "has_default_val": False,
|
"has_default_val": False,
|
||||||
# "is_array": False},
|
"is_array": False},
|
||||||
# {"name": "normal_col",
|
{"name": "normal_col",
|
||||||
# "display_name": "normal_col",
|
"display_name": "normal_col",
|
||||||
# "column_type": "character varying",
|
"column_type": "character varying",
|
||||||
# "column_type_internal": "character varying",
|
"column_type_internal": "character varying",
|
||||||
# "pos": 1,
|
"pos": 1,
|
||||||
# "label": "normal_col<br>character varying",
|
"label": "normal_col<br>character varying",
|
||||||
# "cell": "string",
|
"cell": "string",
|
||||||
# "can_edit": True,
|
"can_edit": True,
|
||||||
# "type": "character varying",
|
"type": "character varying",
|
||||||
# "not_null": False,
|
"not_null": False,
|
||||||
# "has_default_val": False,
|
"has_default_val": False,
|
||||||
# "is_array": False}
|
"is_array": False}
|
||||||
# ]
|
]
|
||||||
# }
|
}
|
||||||
# )),
|
)),
|
||||||
]
|
]
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
|
|
@ -584,7 +584,7 @@ class StartRunningQueryTest(BaseTestGenerator):
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
# Reset methods to the original state
|
# Reset methods to the original state
|
||||||
StartRunningQuery.is_rollback_statement_required = \
|
StartRunningQuery.is_begin_required_for_sql_query = \
|
||||||
staticmethod(self.is_rollback_statement_required)
|
staticmethod(self.is_begin_required_for_sql_query)
|
||||||
StartRunningQuery.is_rollback_statement_required = \
|
StartRunningQuery.is_rollback_statement_required = \
|
||||||
staticmethod(self.is_rollback_statement_required)
|
staticmethod(self.is_rollback_statement_required)
|
||||||
|
|
Loading…
Reference in New Issue