def test_vgextend(self):
        self.assertEqual(linux_lvm.vgextend('', ''),
                         'Error: vgname and device(s) are both required')

        mock = MagicMock(return_value='A\nB')
        with patch.dict(linux_lvm.__salt__, {'cmd.run': mock}):
            with patch.object(linux_lvm, 'vgdisplay', return_value={}):
                self.assertDictEqual(linux_lvm.vgextend('A', 'B'),
                                     {'Output from vgextend': 'A'})
Tests add physical volumes to an LVM volume group
dataset/ETHPy150Open saltstack/salt/tests/unit/modules/linux_lvm_test.py/LinuxLVMTestCase.test_vgextend