def test_index_view_with_a_past_poll(self):
        create_poll(question="Past poll.", days=-30)
        response = self.client.get(reverse('polls:index'))
        self.assertQuerysetEqual(
            response.context['latest_poll_list'],
            ['<Poll: Past poll.>']
        )
Polls with a pub_date in the past should be displayed on the index page.
dataset/ETHPy150Open disqus/sharding-example/polls/tests.py/PollViewTests.test_index_view_with_a_past_poll