'What does the empty list passed in the assert function mean?
sorry for the weird title.
I am currently learning Django, and going through their tutorial. In Part 5, it discusses test cases which I am understanding well.
However, I am unclear what the last line of the snippet means.
def test_future_question(self):
#questions with a pub_date in the future aren't displayed on the index page.
create_question(question_text="Future question.", days=30)
response = self.client.get(reverse('polls:index'))
self.assertContains(response, "No polls are available.")
self.assertQuerysetEqual(response.context['latest_question_list'], [])
Why must we pass an empty list? It doesn't make any sense to me, and I am just wanting to learn why.
Thank you!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|