Пример #1
0
    def test_event_published_order(self):
        """Make sure template tag shows all events.

        Must include todays events, but not events in the past

        """
        self._publish(get_event_garden())
        self._publish(get_event_history())
        self._publish(get_event_microchip())
        self._publish(get_event_temp())
        self._publish(get_event_temp_today())
        result = event_list()
        published = result.get('event_list')
        self.assertListEqual(
            [
                'Temp Title Today',
                'History Society',
                'Gardening Trip',
            ],
            [t.title for t in published]
        )
 def test_update_perm(self):
     event = get_event_microchip()
     self.assert_logged_in(
         reverse('pump.event.update', kwargs={'pk': event.pk})
     )
 def test_detail_perm(self):
     """the 'assert_logged_in' method uses the 'web' user"""
     event = get_event_microchip()
     self.assert_logged_in(
         reverse('pump.event.detail', kwargs={'pk': event.pk})
     )