mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix some of the mock names for the new API
This commit is contained in:
parent
9b3023e851
commit
7d02ad4f06
1 changed files with 2 additions and 2 deletions
|
@ -79,7 +79,7 @@ class PsTestCase(TestCase):
|
|||
MOCK_PROC.name = 'test_mock_proc'
|
||||
MOCK_PROC.pid = 9999999999
|
||||
|
||||
@patch('psutil.get_pid_list', new=MagicMock(return_value=STUB_PID_LIST))
|
||||
@patch('psutil.pid_list', new=MagicMock(return_value=STUB_PID_LIST))
|
||||
def test_get_pid_list(self):
|
||||
self.assertListEqual(STUB_PID_LIST, ps.get_pid_list())
|
||||
|
||||
|
@ -161,7 +161,7 @@ class PsTestCase(TestCase):
|
|||
{'read_time': 2000, 'write_bytes': 600, 'read_bytes': 500, 'write_time': 3000, 'read_count': 1000,
|
||||
'write_count': 2000}, ps.disk_io_counters())
|
||||
|
||||
@patch('psutil.get_users', new=MagicMock(return_value=[STUB_USER]))
|
||||
@patch('psutil.users', new=MagicMock(return_value=[STUB_USER]))
|
||||
def test_get_users(self):
|
||||
self.assertDictEqual({'terminal': 'ttys000', 'started': 0.0, 'host': 'localhost', 'name': 'bdobbs'},
|
||||
ps.get_users()[0])
|
||||
|
|
Loading…
Add table
Reference in a new issue