Пример #1
0
 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 == []
Пример #2
0
 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 == []