Skip to content

Commit

Permalink
Fixes tests of smartctl plugins
Browse files Browse the repository at this point in the history
The function `_list_disks` is now `_list_devices`.

Signed-off-by: Guillaume <[email protected]>
  • Loading branch information
gthvn1 committed Jan 27, 2025
1 parent ed5a7e4 commit 378dd8d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_smartctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@
}"""

@mock.patch("smartctl.run_command", autospec=True)
@mock.patch("smartctl._list_disks", autospec=True)
@mock.patch("smartctl._list_devices", autospec=True)
class TestSmartctl:
def test_smartctl_error(self, _list_disks, run_command, fs):
_list_disks.side_effect = Exception("Error!")
def test_smartctl_error(self, _list_devices, run_command, fs):
_list_devices.side_effect = Exception("Error!")

with pytest.raises(XenAPIPlugin.Failure) as e:
get_health(None, None)
Expand Down

0 comments on commit 378dd8d

Please sign in to comment.