mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
1) Fixed an issue where the process watcher dialog throws an error for
the database server which is already removed. Fixes #5985 2) Fixed cognitive complexity reported by SonarQube.
This commit is contained in:
committed by
Akshay Joshi
parent
a026f339c3
commit
be386e77f2
@@ -212,9 +212,11 @@ class BatchProcessTest(BaseTestGenerator):
|
||||
@patch('pgadmin.misc.bgprocess.processes.Process')
|
||||
@patch('pgadmin.misc.bgprocess.processes.BatchProcess.'
|
||||
'update_process_info')
|
||||
def _check_list(self, p, import_export_obj, update_process_info_mock,
|
||||
process_mock,
|
||||
get_storage_directory_mock, get_complete_file_path_mock,
|
||||
@patch('pgadmin.misc.bgprocess.processes.BatchProcess.'
|
||||
'_operate_orphan_process')
|
||||
def _check_list(self, p, import_export_obj, _operate_orphan_process_mock,
|
||||
update_process_info_mock, process_mock,
|
||||
get_complete_file_path_mock, get_storage_directory_mock,
|
||||
realpath_mock):
|
||||
class TestMockProcess():
|
||||
def __init__(self, desc, args, cmd):
|
||||
@@ -237,6 +239,7 @@ class BatchProcessTest(BaseTestGenerator):
|
||||
get_complete_file_path_mock.return_value = self.params['filename']
|
||||
realpath_mock.return_value = self.params['filename']
|
||||
get_storage_directory_mock.return_value = '//'
|
||||
_operate_orphan_process_mock.return_value = False
|
||||
|
||||
ret_value = p.list()
|
||||
self.assertEqual(1, len(ret_value))
|
||||
|
||||
Reference in New Issue
Block a user