Exemplo n.º 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_remove_perm(self):
     event = get_event_history()
     self.assert_logged_in(
         reverse('pump.event.remove', kwargs={'pk': event.pk})
     )
 def test_publish_perm(self):
     event = get_event_history()
     self.assert_logged_in(
         reverse('pump.event.publish', kwargs={'pk': event.pk})
     )