def test_probe_w_device_kwarg_and_arg(self, *args, **kwargs): '''device arg is concatanated with possitional args''' parted.probe("/dev/sdb", device="/dev/sda") parted.salt.utils.kwargs_warn_until.called_once_with( {'device': '/dev/sda'}) self.cmdrun.called_once_with(['partprobe', '/dev/sda', '/dev/sdb'], python_shell=False)
def test_probe_w_device_kwarg(self, *args, **kwargs): run = MagicMock() with patch.dict(parted.__salt__, {'cmd.run': run}): parted.probe(device="/dev/sda") parted.salt.utils.kwargs_warn_until.called_once_with( {'device': '/dev/sda'}) run.called_once_with(['partprobe', '/dev/sda'], python_shell=False)
def test_probe_w_device_kwarg_and_arg(self, *args, **kwargs): '''device arg is concatanated with possitional args''' run = MagicMock() with patch.dict(parted.__salt__, {'cmd.run': run}): parted.probe("/dev/sdb", device="/dev/sda") parted.salt.utils.kwargs_warn_until.called_once_with( {'device': '/dev/sda'}) run.called_once_with(['partprobe', '/dev/sda', '/dev/sdb'], python_shell=False)
def test_probe_w_device_kwarg(self, *args, **kwargs): device_kwargs = {'device': '/dev/sda'} parted.probe(**device_kwargs) self.check_kwargs_warn_until_devices(device_kwargs) self.cmdrun.assert_called_once_with('partprobe -- /dev/sda')
def test_probe_wo_args(self): parted.probe() self.cmdrun.assert_called_once_with('partprobe -- ')
def test_probe_w_single_arg(self): with patch('salt.modules.parted._validate_device', MagicMock()): parted.probe('/dev/sda') self.cmdrun.assert_called_once_with('partprobe -- /dev/sda')
def test_probe_w_single_arg(self): parted.probe('/dev/sda') self.cmdrun.assert_called_once_with('partprobe -- /dev/sda')
def test_probe_w_multiple_args(self): parted.probe('/dev/sda', '/dev/sdb') self.cmdrun.assert_called_once_with('partprobe -- /dev/sda /dev/sdb')
def test_probe_w_single_arg(self): parted.probe("/dev/sda") self.cmdrun.called_once_with(['partprobe', '/dev/sda'], python_shell=False)
def test_probe_w_device_kwarg_and_arg(self, *args, **kwargs): '''device arg is concatenated with positional args''' device_kwargs = {'device': '/dev/sda'} parted.probe("/dev/sdb", **device_kwargs) self.check_kwargs_warn_until_devices(device_kwargs) self.cmdrun.assert_called_once_with('partprobe -- /dev/sda /dev/sdb')
def test_probe_w_single_arg(self): parted.probe("/dev/sda") self.cmdrun.assert_called_once_with('partprobe -- /dev/sda')
def test_probe_w_multiple_args(self): run = MagicMock() with patch.dict(parted.__salt__, {'cmd.run': run}): parted.probe('/dev/sda', '/dev/sdb') run.called_once_with(['partprobe', '/dev/sda', '/dev/sdb'], python_shell=False)
def test_probe_wo_args(self): run = MagicMock() with patch.dict(parted.__salt__, {'cmd.run': run}): parted.probe() run.called_once_with(['partprobe'], python_shell=False)
def test_probe_w_multiple_args(self): parted.probe("/dev/sda", "/dev/sdb") self.cmdrun.assert_called_once_with("partprobe -- /dev/sda /dev/sdb")
def test_probe_w_multiple_args(self): parted.probe('/dev/sda', '/dev/sdb') self.cmdrun.called_once_with(['partprobe', '/dev/sda', '/dev/sdb'], python_shell=False)
def test_probe_w_device_kwarg(self, *args, **kwargs): parted.probe(device="/dev/sda") parted.salt.utils.kwargs_warn_until.called_once_with( {'device': '/dev/sda'}) self.cmdrun.called_once_with(['partprobe', '/dev/sda'], python_shell=False)
def test_probe_wo_args(self): parted.probe() self.cmdrun.called_once_with(['partprobe'], python_shell=False)