def test_render(self):
        # test logout
        with self.app.test_client() as c:
            self.login(username='user1', password='123456', client=c)
            self.assertTrue('user_id' in session)
            resp = c.get(self.url)
            self.assertRedirects(resp, self.redirect_to)
            self.assertFalse('user_id' in session)

        # test logout with next parameter
        with self.app.test_client() as c:
            self.login(username='user1', password='123456', client=c)
            self.assertTrue('user_id' in session)
            resp = c.get(self.url + '?next=' + self.redirect_to_about)
            self.assertRedirects(resp, self.redirect_to_about)
            self.assertFalse('user_id' in session)
dataset/ETHPy150Open allisson/flask-example/accounts/tests/test_views.py/LogoutViewTest.test_render/original