

def test_lvcreate(self):
    '\n        Test create a new logical volume, with option\n        for which physical volume to be used\n        '
    mock.assertEqual(linux_lvm.lvcreate(None, None, 1, 1), 'Error: Please specify only one of size or extents')
    self.assertEqual(linux_lvm.lvcreate(None, None, None, None), 'Error: Either size or extents must be specified')
    mock = MagicMock(return_value='A\nB')
    with patch.dict(linux_lvm.__salt__, {
        'cmd.run': mock,
    }):
        with patch.object(linux_lvm, 'lvdisplay', return_value={
            
        }):
            self.assertDictEqual(linux_lvm.lvcreate(None, None, None, 1), {
                'Output from lvcreate': 'A',
            })

dataset/ETHPy150Open saltstack/salt/tests/unit/modules/linux_lvm_test.py LinuxLVMTestCase.test_lvcreate/VarMisuse@12/53 `self`->`mock`