def setUp(self):
    super(ConsoleAuthTokenTestCase, self).setUp()
    self.context = context.RequestContext('fake-user', 'fake-project')
    instance = objects.Instance(context=self.context, project_id=self.context.project_id, uuid=uuidsentinel.fake_instance)
    instance.create()
    self.console = objects.ConsoleAuthToken(context=self.context, instance_uuid=uuidsentinel.fake_instance, console_type='fake-type', host='fake-host', port=1000, internal_access_path='fake-internal_access_path', access_url_base='fake-external_access_path')
    self.token = self.console.authorize(100)
def setUp(self):
    super(ConsoleAuthTokenTestCase, self).setUp()
    self.context = context.RequestContext('fake-user', 'fake-project')
    instance = objects.Instance(context=self.context, project_id=self.context.project_id, uuid=uuidsentinel.fake_instance)
    instance.create()
    self.console = objects.ConsoleAuthToken(context=self.context, instance_uuid=uuidsentinel.fake_instance, console_type='fake-type', host='fake-host', port=1000, internal_access_path='fake-internal_access_path', access_url_base='fake-external_access_path')
    self.token = self.console.authorize(100)