def test_news_top(self):
        response = self.client.post('/accounts/login',
                                    {'username': self.username, 'password': self.password})
        self.assertRedirects(response, '/')
        response = self.client.get(reverse('news_top'))
        self.assertEquals(response.status_code, 200)
Test index page with login at /news/top/
dataset/ETHPy150Open treeio/treeio/treeio/news/tests.py/NewsViewsTest.test_news_top