def test_pvdisplay(self):
        mock = MagicMock(return_value={'retcode': 1})
        with patch.dict(linux_lvm.__salt__, {'cmd.run_all': mock}):
            self.assertDictEqual(linux_lvm.pvdisplay(), {})

        mock = MagicMock(return_value={'retcode': 0,
                                       'stdout': 'A:B:C:D:E:F:G:H:I:J:K'})
        with patch.dict(linux_lvm.__salt__, {'cmd.run_all': mock}):
            self.assertDictEqual(linux_lvm.pvdisplay(),
                                 {'A': {'Allocated Physical Extents': 'K',
                                        'Current Logical Volumes Here': 'G',
                                        'Free Physical Extents': 'J',
                                        'Internal Physical Volume Number': 'D',
                                        'Physical Extent Size (kB)': 'H',
                                        'Physical Volume (not) Allocatable': 'F',
                                        'Physical Volume Device': 'A',
                                        'Physical Volume Size (kB)': 'C',
                                        'Physical Volume Status': 'E',
                                        'Total Physical Extents': 'I',
                                        'Volume Group Name': 'B'}})

            mockpath = MagicMock(return_value='Z')
            with patch.object(os.path, 'realpath', mockpath):
                self.assertDictEqual(linux_lvm.pvdisplay(real=True),
                                     {'Z': {'Allocated Physical Extents': 'K',
                                            'Current Logical Volumes Here': 'G',
                                            'Free Physical Extents': 'J',
                                            'Internal Physical Volume Number': 'D',
                                            'Physical Extent Size (kB)': 'H',
                                            'Physical Volume (not) Allocatable': 'F',
                                            'Physical Volume Device': 'A',
                                            'Physical Volume Size (kB)': 'C',
                                            'Physical Volume Status': 'E',
                                            'Real Physical Volume Device': 'Z',
                                            'Total Physical Extents': 'I',
                                            'Volume Group Name': 'B'}})
Tests information about the physical volume(s)
dataset/ETHPy150Open saltstack/salt/tests/unit/modules/linux_lvm_test.py/LinuxLVMTestCase.test_pvdisplay