devtools/testlib.py
changeset 3676 fa170564e1a0
parent 3657 706d7bf0ae3d
child 3720 5376aaadd16b
equal deleted inserted replaced
3675:5d143781a604 3676:fa170564e1a0
   559         self.assertEquals(cnx.login, origcnx.login)
   559         self.assertEquals(cnx.login, origcnx.login)
   560         self.assertEquals(cnx.anonymous_connection, False)
   560         self.assertEquals(cnx.anonymous_connection, False)
   561         self.assertEquals(path, 'view')
   561         self.assertEquals(path, 'view')
   562         self.assertEquals(params, {'__message': 'welcome %s !' % cnx.user().login})
   562         self.assertEquals(params, {'__message': 'welcome %s !' % cnx.user().login})
   563 
   563 
   564     def assertAuthFailure(self, req):
   564     def assertAuthFailure(self, req, nbsessions=0):
   565         self.assertRaises(AuthenticationError, self.app.connect, req)
   565         self.assertRaises(AuthenticationError, self.app.connect, req)
   566         self.assertEquals(req.cnx, None)
   566         self.assertEquals(req.cnx, None)
   567         self.assertEquals(len(self.open_sessions), 0)
   567         self.assertEquals(len(self.open_sessions), nbsessions)
   568         clear_cache(req, 'get_authorization')
   568         clear_cache(req, 'get_authorization')
   569 
   569 
   570     # content validation #######################################################
   570     # content validation #######################################################
   571 
   571 
   572     # validators are used to validate (XML, DTD, whatever) view's content
   572     # validators are used to validate (XML, DTD, whatever) view's content