Example #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())
Example #2
0
 def test_logout_not_auth(self):
     """It should be possible to log out even when not logged in."""
     self.assertTrue(auth.logout())