def METHOD_NAME(tmpdir) -> MagicMock:
    """Mock Partition Manager."""
    partfile = os.path.join(tmpdir, "fake-partition")
    mock_part = MagicMock(spec=PartitionManager)
    mock_part.find_unused_partition.return_value = Partition(2, partfile)
    mock_part.switch_partition.return_value = Partition(2, partfile)
    mock_part.resize_partition.return_value = True
    mock_part.mount_fs.return_value = True
    mock_part.umount_fs.return_value = True
    mock_part.mountpoint_root.return_value = "/mnt"
    return mock_part