Prevent auto-commit/rollback being changed mid-transaction, and make the Preferences the defaults, not the current values.

This commit is contained in:
Akshay Joshi authored and Dave Page committed 2019-03-04 10:44:31 +00:00
1 parent efeb9d6d20
commit 0aeb20ee64
6 files changed
+46 -96

No files matched your search

@@ -23,17 +23,13 @@ class StartQueryTool(BaseTestGenerator):
calls the needed functions
"""
@patch('pgadmin.tools.sqleditor.set_trans_preferences')
@patch('pgadmin.tools.sqleditor.extract_sql_from_network_parameters')
def runTest(self, extract_sql_from_network_parameters_mock,
set_trans_preferences):
def runTest(self, extract_sql_from_network_parameters_mock):
"""Check correct function is called to handle to run query."""
extract_sql_from_network_parameters_mock.return_value = \
'transformed sql'
set_trans_preferences.return_value = ''
with patch.object(StartRunningQuery,
'execute',
return_value='some result'