def METHOD_NAME(self):
    with session.begin():
        task = data_setup.create_task(name=u'invalid_task', valid=False)
        task.uploader = None
    out = run_client(['bkr', 'task-details', '--invalid', task.name])
    details = eval(out[len(task.name) + 1:]) # XXX dodgy
    self.assertEquals(details['name'], 'invalid_task')