Ejemplo n.º 1
0
    def test_login_logout(self):
        self.assertTrue(auth.login('user', 'pass'))
        self.assertTrue(current_user.is_authenticated())

        self.assertTrue(auth.logout())
        self.assertFalse(current_user.is_authenticated())
Ejemplo n.º 2
0
 def test_logout_not_auth(self):
     """It should be possible to log out even when not logged in."""
     self.assertTrue(auth.logout())