'Only mounted blockdevices appear in get_mounts.'

def test_get_mounts_shows_only_mounted(self):

    blockdevice = self._get_free_blockdevice()
    mountpoint = self._get_directory_for_mount()
    self.manager_under_test.make_filesystem(blockdevice, 'ext4')
    self.manager_under_test.mount(blockdevice, mountpoint)
    mount_info = MountInfo(blockdevice=blockdevice, mountpoint=mountpoint)
    self.assertIn(mount_info, self.manager_under_test.get_mounts())
    self.manager_under_test.unmount(blockdevice)
    self.assertNotIn(mount_info, self.manager_under_test.get_mounts())
