예제 #1
0
 def test_get_secondary_nav_items(self):
     request = self.get_request()
     request.path = '/regulations/1002/4/'
     sections = list(self.reg_page.get_section_query(request).all())
     test_nav_items = get_secondary_nav_items(request, self.reg_page,
                                              sections)[0]
     self.assertEqual(
         len(test_nav_items),
         Subpart.objects.filter(version=self.effective_version).exclude(
             sections=None).count())
예제 #2
0
 def test_get_secondary_nav_items(self):
     request = self.get_request()
     request.path = '/regulations/1002/4/'
     sections = list(self.reg_page.get_section_query().all())
     test_nav_items = get_secondary_nav_items(
         request, self.reg_page, sections
     )[0]
     self.assertEqual(
         len(test_nav_items),
         Subpart.objects.filter(
             version=self.effective_version
         ).exclude(
             sections=None
         ).count()
     )