def test_property_data_zpool(self): ''' Test parsing of zpool get output ''' with patch.object(zfs, '_zfs_cmd', MagicMock(return_value='/sbin/zfs')): with patch.object(zfs, '_zpool_cmd', MagicMock(return_value='/sbin/zpool')): with patch.object(zfs, '_exec', MagicMock(return_value=self.pmap_exec_zpool)): self.assertEqual(zfs.property_data_zpool(), self.pmap_zpool)
def test_property_data_zpool(self): """ Test parsing of zpool get output """ with patch.object(zfs, "_zfs_cmd", MagicMock(return_value="/sbin/zfs")): with patch.object(zfs, "_zpool_cmd", MagicMock(return_value="/sbin/zpool")): with patch.object( zfs, "_exec", MagicMock(return_value=self.pmap_exec_zpool)): self.assertEqual(zfs.property_data_zpool(), self.pmap_zpool)