コード例 #1
0
ファイル: test_views.py プロジェクト: giallu/hyperkitty
 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)
コード例 #2
0
ファイル: test_views.py プロジェクト: TomasTomecek/hyperkitty
 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)
コード例 #3
0
 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)