mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-01-24 15:26:46 -06:00
Fixed BatchProcessTest cases failing on Jenkins.
This commit is contained in:
parent
3e2a1c4eca
commit
29c3c0cf7f
@ -142,8 +142,10 @@ class BatchProcessTest(BaseTestGenerator):
|
||||
@patch('pgadmin.misc.bgprocess.processes.Process')
|
||||
@patch('pgadmin.misc.bgprocess.processes.BatchProcess.'
|
||||
'update_process_info')
|
||||
def _check_list(self, p, maintenance_obj, update_process_info_mock,
|
||||
process_mock):
|
||||
@patch('pgadmin.misc.bgprocess.processes.BatchProcess.'
|
||||
'_operate_orphan_process')
|
||||
def _check_list(self, p, maintenance_obj, _operate_orphan_process_mock,
|
||||
update_process_info_mock, process_mock):
|
||||
class TestMockProcess():
|
||||
def __init__(self, desc, args, cmd):
|
||||
self.pid = 1
|
||||
@ -163,6 +165,7 @@ class BatchProcessTest(BaseTestGenerator):
|
||||
]
|
||||
|
||||
update_process_info_mock.return_value = [True, True]
|
||||
_operate_orphan_process_mock.return_value = False
|
||||
|
||||
ret_value = p.list()
|
||||
self.assertEqual(1, len(ret_value))
|
||||
|
@ -142,8 +142,10 @@ class BatchProcessTest(BaseTestGenerator):
|
||||
@patch('pgadmin.misc.bgprocess.processes.Process')
|
||||
@patch('pgadmin.misc.bgprocess.processes.BatchProcess.'
|
||||
'update_process_info')
|
||||
def _check_list(self, p, restore_obj, update_process_info_mock,
|
||||
process_mock):
|
||||
@patch('pgadmin.misc.bgprocess.processes.BatchProcess.'
|
||||
'_operate_orphan_process')
|
||||
def _check_list(self, p, restore_obj, _operate_orphan_process_mock,
|
||||
update_process_info_mock, process_mock):
|
||||
class TestMockProcess():
|
||||
def __init__(self, desc, args, cmd):
|
||||
self.pid = 1
|
||||
@ -163,6 +165,7 @@ class BatchProcessTest(BaseTestGenerator):
|
||||
]
|
||||
|
||||
update_process_info_mock.return_value = [True, True]
|
||||
_operate_orphan_process_mock.return_value = False
|
||||
|
||||
ret_value = p.list()
|
||||
self.assertEqual(1, len(ret_value))
|
||||
|
Loading…
Reference in New Issue
Block a user