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