def test_overview(self): now = datetime.datetime.now() request = self.factory.get(reverse('list_overview', args=["*****@*****.**"])) request.user = self.user response = archives(request, "*****@*****.**", now.year, now.month) self.assertContains(response, "icon-eye-close", count=2, status_code=200)
def test_no_date(self): today = datetime.date.today() request = self.factory.get("/archives") response = archives(request, '*****@*****.**') final_url = reverse('archives_with_month', kwargs={'mlist_fqdn': '*****@*****.**', 'year': today.year, 'month': today.month, }) self.assertEqual(response["location"], final_url)
def test_overview(self): now = datetime.datetime.now() request = self.factory.get( reverse('list_overview', args=["*****@*****.**"])) request.user = self.user response = archives(request, "*****@*****.**", now.year, now.month) self.assertContains(response, "icon-eye-close", count=2, status_code=200)