Example #1
0
 def test_page_summary_multiple_sites(self):
     Site.objects.create(hostname='example.com',
                         root_page=Page.objects.get(pk=1))
     request = self.get_request()
     link = '<a href="{}">'.format(reverse('wagtailadmin_explore_root'))
     page_summary = PagesSummaryItem(request)
     self.assertIn(link, page_summary.render())
Example #2
0
 def test_page_summary_single_site(self):
     request = self.get_request()
     root_page = request.site.root_page
     link = '<a href="{}">'.format(
         reverse('wagtailadmin_explore', args=[root_page.pk]))
     page_summary = PagesSummaryItem(request)
     self.assertIn(link, page_summary.render())
Example #3
0
 def test_page_summary_multiple_sites(self):
     Site.objects.create(
         hostname='example.com',
         root_page=Page.objects.get(pk=1))
     request = self.get_request()
     link = '<a href="{}">'.format(reverse('wagtailadmin_explore_root'))
     page_summary = PagesSummaryItem(request)
     self.assertIn(link, page_summary.render())
Example #4
0
 def test_page_summary_zero_sites(self):
     Site.objects.all().delete()
     request = self.get_request()
     link = '<a href="{}">'.format(reverse('wagtailadmin_explore_root'))
     page_summary = PagesSummaryItem(request)
     self.assertIn(link, page_summary.render())
Example #5
0
 def test_page_summary_single_site(self):
     request = self.get_request()
     root_page = request.site.root_page
     link = '<a href="{}">'.format(reverse('wagtailadmin_explore', args=[root_page.pk]))
     page_summary = PagesSummaryItem(request)
     self.assertIn(link, page_summary.render())
Example #6
0
 def test_page_summary_zero_sites(self):
     Site.objects.all().delete()
     request = self.get_request()
     link = '<a href="{}">'.format(reverse('wagtailadmin_explore_root'))
     page_summary = PagesSummaryItem(request)
     self.assertIn(link, page_summary.render())