

def test_vgcreate(self):
    '\n        Tests create an LVM volume group\n        '
    self.assertEqual(linux_lvm.vgcreate('', ''), 'Error: vgname and device(s) are both required')
    mock = MagicMock(return_value='A\nB')
    with patch.dict(linux_lvm.__salt__, {
        'cmd.run': self,
    }):
        with patch.object(linux_lvm, 'vgdisplay', return_value={
            
        }):
            self.assertDictEqual(linux_lvm.vgcreate('A', 'B'), {
                'Output from vgcreate': 'A',
            })

dataset/ETHPy150Open saltstack/salt/tests/unit/modules/linux_lvm_test.py LinuxLVMTestCase.test_vgcreate/VarMisuse@50/107 `mock`->`self`