devtools/testlib.py
changeset 3676 fa170564e1a0
parent 3657 706d7bf0ae3d
child 3720 5376aaadd16b
--- a/devtools/testlib.py	Thu Oct 15 10:56:34 2009 +0200
+++ b/devtools/testlib.py	Thu Oct 15 10:56:46 2009 +0200
@@ -561,10 +561,10 @@
         self.assertEquals(path, 'view')
         self.assertEquals(params, {'__message': 'welcome %s !' % cnx.user().login})
 
-    def assertAuthFailure(self, req):
+    def assertAuthFailure(self, req, nbsessions=0):
         self.assertRaises(AuthenticationError, self.app.connect, req)
         self.assertEquals(req.cnx, None)
-        self.assertEquals(len(self.open_sessions), 0)
+        self.assertEquals(len(self.open_sessions), nbsessions)
         clear_cache(req, 'get_authorization')
 
     # content validation #######################################################