Do not know why this test returning 404 instead of 200. Plz help.
def test_portal_day_archive_view(self):
self.entry = Entry.objects.create(pub_date=self.now, is_active=True, headline='active', slug='b')
url = reverse('portal:archive_day', kwargs={'year': self.entry.pub_date.year,
'month': self.entry.pub_date.strftime('%b').lower(),
'day': self.entry.pub_date.strftime('%d')}
)
self.assertEqual(200, self.client.get(url).status_code)
Aucun commentaire:
Enregistrer un commentaire