def setUp(self):
        super(ConsolesControllerTest, self).setUp()
        self.flags(verbose=True)
        self.instance_db = FakeInstanceDB()
        self.stubs.Set(db, 'instance_get',
                       self.instance_db.return_server_by_id)
        self.stubs.Set(db, 'instance_get_by_uuid',
                       self.instance_db.return_server_by_uuid)
        self.uuid = str(utils.gen_uuid())
        self.url = '/v2/fake/servers/%s/consoles' % self.uuid
        self.controller = consoles.Controller()