def test_overridden_hook_get(self):
        hook = self.EverythingPrivateHook(self.extension, self.resource, [])

        rsp = self.api_get(self.url,
                           expected_mimetype=self.resource.item_mimetype)

        # Since the hook registers the callback function on initialization,
        # which stores a pointer to the method, we can't use SpyAgency after
        # the hook has already been initialized. Since SpyAgency's spy_on
        # function requires an instance of a class, we also cannot spy on the
        # hook function before initialization. Therefore, as a workaround,
        # we're setting a variable in the function to ensure that it is in
        # fact being called.
        self.assertTrue(hook.called)
        self.assertNotIn('public', rsp['test']['extra_data'])
        self.assertNotIn('readonly', rsp['test']['extra_data'])
        self.assertNotIn('private', rsp['test']['extra_data'])
Flag indicating project access behavior is enabled or not
dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/extensions/tests.py/APIExtraDataAccessHookTests.test_overridden_hook_get--crossover with--dataset/ETHPy150Open openstack/python-barbicanclient/barbicanclient/acls.py/_PerOperationACL.project_access