def setUp(self):
        super(InstanceActionsTest, self).setUp()
        self.controller = instance_actions.InstanceActionsController()
        self.fake_actions = copy.deepcopy(fake_instance_actions.FAKE_ACTIONS)
        self.fake_events = copy.deepcopy(fake_instance_actions.FAKE_EVENTS)

        def fake_get(self,
                     context,
                     instance_uuid,
                     expected_attrs=None,
                     want_objects=False):
            return {'uuid': instance_uuid}

        def fake_instance_get_by_uuid(context,
                                      instance_id,
                                      columns_to_join=None,
                                      use_subordinate=False):
            return fake_instance.fake_db_instance(
                **{
                    'name': 'fake',
                    'project_id': '%s_unequal' % context.project_id
                })

        self.stubs.Set(compute_api.API, 'get', fake_get)
        self.stubs.Set(db, 'instance_get_by_uuid', fake_instance_get_by_uuid)
 def setUp(self):
     super(InstanceActionsPolicyTest, self).setUp()
     self.controller = instance_actions.InstanceActionsController()