'Content can exist on any day of the previous month. Refs #14711'

def test_previous_month_without_content(self):

    self.pubdate_list = [datetime.date(2010, month, day) for (month, day) in ((9, 1), (10, 2), (11, 3))]
    for pubdate in self.pubdate_list:
        name = str(pubdate)
        Book.objects.create(name=name, slug=name, pages=100, pubdate=pubdate)
    res = self.client.get('/dates/books/2010/nov/allow_empty/')
    self.assertEqual(res.status_code, 200)
    self.assertEqual(res.context['previous_month'], datetime.date(2010, 10, 1))
    res = self.client.get('/dates/books/2010/nov/')
    self.assertEqual(res.status_code, 200)
    self.assertEqual(res.context['previous_month'], datetime.date(2010, 10, 1))
    res = self.client.get('/dates/books/2010/oct/')
    self.assertEqual(res.status_code, 200)
    self.assertEqual(res.context['previous_month'], datetime.date(2010, 9, 1))
