cubicweb/server/test/unittest_hook.py
changeset 12027 c62c80f20a82
parent 11769 f5b815f67ce2
child 12035 2fcb9339f69a
equal deleted inserted replaced
12026:c21b399c9269 12027:c62c80f20a82
   137     def test_session_open_close(self):
   137     def test_session_open_close(self):
   138         import hooks # cubicweb/server/test/data/hooks.py
   138         import hooks # cubicweb/server/test/data/hooks.py
   139         anonaccess = self.new_access('anon')
   139         anonaccess = self.new_access('anon')
   140         with anonaccess.repo_cnx() as cnx:
   140         with anonaccess.repo_cnx() as cnx:
   141             self.assertEqual(hooks.CALLED_EVENTS['session_open'], 'anon')
   141             self.assertEqual(hooks.CALLED_EVENTS['session_open'], 'anon')
   142         anonaccess.close()
       
   143         self.assertEqual(hooks.CALLED_EVENTS['session_close'], 'anon')
       
   144 
   142 
   145 
   143 
   146 if __name__ == '__main__':
   144 if __name__ == '__main__':
   147     unittest.main()
   145     unittest.main()