'``temporary_mount`` when used as a context manager will unmount and
remove the temporary mountpoint on context exit.'

def test_context_manager(self):

    filename = random_name(self)
    filecontent = random_name(self)
    mounts = []
    with temporary_mount(self.device.device) as mountpoint1:
        mounts.append(mountpoint1)
        mountpoint1.child(filename).setContent(filecontent)
    self.assertFalse(mounts[0].exists())
    with temporary_mount(self.device.device) as mountpoint2:
        mounts.append(mountpoint2)
        self.assertEqual(filecontent, mountpoint2.child(filename).getContent())
    self.assertFalse(mounts[1].exists())
    self.assertNotEqual(*mounts)
