def test_register_invalid_hook(self):
        self.registered = False

        with self.assertRaises(RegistrationError):
            self.InvalidCallableHook(self.extension, self.resource, [])

        self.assertSetEqual(set(),
                            set(self.resource.extra_data_access_callbacks))
Testing hook registration with invalid hook
dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/extensions/tests.py/APIExtraDataAccessHookTests.test_register_invalid_hook