server/test/unittest_session.py
changeset 9402 2c48c091b6a2
parent 9113 af6efc15fc90
parent 9240 6356adcb652c
child 9478 2d7521881d3d
--- a/server/test/unittest_session.py	Tue Jul 02 17:09:04 2013 +0200
+++ b/server/test/unittest_session.py	Mon Jan 13 13:47:47 2014 +0100
@@ -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):