def test_mount(self): ''' Test if it pass in the nbd connection device location, mount all partitions and return a dict of mount points. ''' mock = MagicMock(return_value=True) with patch.dict(qemu_nbd.__salt__, {'cmd.run': mock}): self.assertDictEqual(qemu_nbd.mount('/dev/nbd0'), {})
def test_mount(): """ Test if it pass in the nbd connection device location, mount all partitions and return a dict of mount points. """ mock = MagicMock(return_value=True) with patch.dict(qemu_nbd.__salt__, {"cmd.run": mock}): assert qemu_nbd.mount("/dev/nbd0") == {}