Beispiel #1
0
 def test_disk_toggle(self):
     with patch('salt.modules.parted_partition._validate_device', MagicMock()):
         self.cmdrun.return_value = ''
         output = parted.disk_toggle('/dev/sda', 'pmbr_boot')
         self.cmdrun.assert_called_once_with(
             ['parted', '-m', '-s', '/dev/sda', 'disk_toggle', 'pmbr_boot'])
         assert output == []
Beispiel #2
0
 def test_disk_toggle(self):
     with patch("salt.modules.parted_partition._validate_device",
                MagicMock()):
         self.cmdrun.return_value = ""
         output = parted.disk_toggle("/dev/sda", "pmbr_boot")
         self.cmdrun.assert_called_once_with(
             ["parted", "-m", "-s", "/dev/sda", "disk_toggle", "pmbr_boot"])
         assert output == []