def test_disk_set(self): with patch("salt.modules.parted_partition._validate_device", MagicMock()): self.cmdrun.return_value = "" output = parted.disk_set("/dev/sda", "pmbr_boot", "on") self.cmdrun.assert_called_once_with( ["parted", "-m", "-s", "/dev/sda", "disk_set", "pmbr_boot", "on"] ) assert output == []
def test_disk_set(self): with patch('salt.modules.parted_partition._validate_device', MagicMock()): self.cmdrun.return_value = '' output = parted.disk_set('/dev/sda', 'pmbr_boot', 'on') self.cmdrun.assert_called_once_with( ['parted', '-m', '-s', '/dev/sda', 'disk_set', 'pmbr_boot', 'on']) assert output == []