@@ -0,0 +1,2831 @@
+import datetime%0A%0Afrom django.core.urlresolvers import reverse%0A%0Afrom ..models import Event, Task, Role%0Afrom .base import TestBase%0A%0A%0Aclass TestDebrief(TestBase):%0A    def setUp(self):%0A        super().setUp()%0A        self._setUpUsersAndLogin()%0A%0A        self.today = datetime.date.today()%0A        self.tomorrow = self.today + datetime.timedelta(days=1)%0A        self.yesterday = self.today - datetime.timedelta(days=1)%0A        self.after_tomorrow = self.today + datetime.timedelta(days=2)%0A%0A        # set up some testing Events%0A        self.e1 = Event.objects.create(%0A            site=self.site_alpha,%0A            slug=%22in-range%22,%0A            start=self.today,%0A            end=self.tomorrow,%0A        )%0A%0A        self.e2 = Event.objects.create(%0A            site=self.site_alpha,%0A            slug=%22out-of-range1%22,%0A            start=self.yesterday,%0A            end=self.tomorrow,%0A        )%0A%0A        self.e3 = Event.objects.create(%0A            site=self.site_alpha,%0A            slug=%22out-of-range2%22,%0A            start=self.today,%0A            end=self.after_tomorrow,%0A        )%0A%0A        self.role = Role.objects.create(name='instructor')%0A        Task.objects.create(event=self.e1, person=self.hermione,%0A                            role=self.role)%0A        Task.objects.create(event=self.e2, person=self.hermione,%0A                            role=self.role)%0A        Task.objects.create(event=self.e3, person=self.hermione,%0A                            role=self.role)%0A%0A    def test_debrief(self):%0A        %22Make sure proper events are returned withing specific date ranges.%22%0A        data = %7B%0A            'begin_date': self.today,%0A            'end_date': self.tomorrow%0A        %7D%0A        rv = self.client.post(reverse('debrief'), data)%0A        assert rv.status_code == 200%0A        content = rv.content.decode('utf-8')%0A        assert self.e1.slug in content%0A        assert self.e2.slug not in content%0A        assert self.e3.slug not in content%0A%0A        data%5B'begin_date'%5D = self.yesterday%0A        rv = self.client.post(reverse('debrief'), data)%0A        assert rv.status_code == 200%0A        content = rv.content.decode('utf-8')%0A        assert self.e1.slug in content%0A        assert self.e2.slug in content%0A        assert self.e3.slug not in content%0A%0A        data%5B'end_date'%5D = self.after_tomorrow%0A        rv = self.client.post(reverse('debrief'), data)%0A        assert rv.status_code == 200%0A        content = rv.content.decode('utf-8')%0A        assert self.e1.slug in content%0A        assert self.e2.slug in content%0A        assert self.e3.slug in content%0A%0A        data%5B'begin_date'%5D = self.today%0A        rv = self.client.post(reverse('debrief'), data)%0A        assert rv.status_code == 200%0A        content = rv.content.decode('utf-8')%0A        assert self.e1.slug in content%0A        assert self.e2.slug not in content%0A        assert self.e3.slug in content%0A

Add test for debrief view