Exemple #1
0
 def test_meeting_has_detail_method(self):
     """
     Tests the has_detail method
     """
     # Create a meeting
     calgary_2014 = Meeting(year=2014, title='Calgary 2014', location='Calgary', associated_with='AAPA')
     calgary_2014.save()
     # Create a default page tree
     create_django_page_tree()
     # IF no fiber page then has_detail should be false
     self.assertEqual(calgary_2014.has_detail(), False)
     # Call page constructor method
     calgary_2014.create_fiber_page()
     # If fiber page then has_detail should be true
     self.assertEqual(calgary_2014.has_detail(), True)
     cfp = Page.objects.get(url__exact=2014)  # get tha page instance
     cfp.is_public = False  # set to not public
     cfp.save()  # save the change
     self.assertEqual(calgary_2014.has_detail(), False)  # Now has detail should return false