diff -r dde9fe1e0ce3 -r 6356adcb652c server/test/unittest_session.py --- a/server/test/unittest_session.py Mon Sep 23 11:13:28 2013 +0200 +++ b/server/test/unittest_session.py Thu Sep 26 11:53:13 2013 +0200 @@ -25,6 +25,15 @@ self.assertFalse(session.running_dbapi_query) session.close() + def test_integrity_hooks(self): + with self.repo.internal_session() as session: + self.assertEqual(HOOKS_ALLOW_ALL, session.hooks_mode) + self.assertEqual(set(('integrity',)), session.disabled_hook_categories) + self.assertEqual(set(), session.enabled_hook_categories) + session.commit() + self.assertEqual(HOOKS_ALLOW_ALL, session.hooks_mode) + self.assertEqual(set(('integrity',)), session.disabled_hook_categories) + self.assertEqual(set(), session.enabled_hook_categories) class SessionTC(CubicWebTC):