def test_process_invalid_arg_1(self):
     with pytest.raises(AssertionError):
         disk_led._process('data1.ceph', '/dev/vdf', 'ident', 'on')
    def test_process(self, mock_localclient, mock_cmd_run):
        mock_localclient.return_value.cmd.return_value = pillar_get_result

        disk_led._process('data1.ceph', 'vdf', 'ident', 'on')
        mock_cmd_run.assert_called_once_with('data1.ceph', 'xxx \'/dev/vdf\'')
    def test_process_get_pillar_failed(self, mock_localclient):
        mock_localclient.return_value.cmd.return_value = []

        with pytest.raises(RuntimeError):
            disk_led._process('data1.ceph', 'vdf', 'ident', 'on')
    def test_process_invalid_config(self, mock_localclient):
        mock_localclient.return_value.cmd.return_value = invalid_pillar_get_result

        with pytest.raises(RuntimeError):
            disk_led._process('data1.ceph', 'vdf', 'ident', 'on')
 def test_process_invalid_arg_1(self):
     with pytest.raises(AssertionError):
         disk_led._process('data1.ceph', 'sdb', 'foo', 'on')