def test_lvremove(self): ''' Test to remove a given existing logical volume from a named existing volume group ''' mock = MagicMock(return_value='A') with patch.dict(linux_lvm.__salt__, {'cmd.run': mock}): self.assertEqual(linux_lvm.lvremove('', ''), 'A')
def test_lvremove(self): """ Test to remove a given existing logical volume from a named existing volume group """ mock = MagicMock(return_value="A") with patch.dict(linux_lvm.__salt__, {"cmd.run": mock}): self.assertEqual(linux_lvm.lvremove("", ""), "A")
def test_lvremove(self): """ Test to remove a given existing logical volume from a named existing volume group """ mock = MagicMock( return_value={ "retcode": 0, "stdout": ' Logical volume "lvtest" successfully removed', }) with patch.dict(linux_lvm.__salt__, {"cmd.run_all": mock}): self.assertEqual( linux_lvm.lvremove("fakelv", "fakevg"), 'Logical volume "fakelv" successfully removed', )