optional nbsessions arg
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 15 Oct 2009 10:56:46 +0200
changeset 3676 fa170564e1a0
parent 3675 5d143781a604
child 3677 acdba524bb8f
optional nbsessions arg
devtools/testlib.py
--- 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 #######################################################