'When used as a context manager, the filesystem is unmounted on exiting
the context.'

def test_context_manager(self):

    filename = random_name(self)
    filecontent = random_name(self)
    mount_directory = self.make_temporary_directory()
    with mount(self.device.device, mount_directory) as mountpoint:
        mountpoint.child(filename).setContent(filecontent)
        self.assertEqual(filecontent, mount_directory.child(filename).getContent())
    self.assertEqual([], mount_directory.children())
    with mount(self.device.device, self.make_temporary_directory()) as mountpoint:
        self.assertEqual(filecontent, mountpoint.child(filename).getContent())
