def test_weekly_repeating_chunk_six_days_span_two_months(self):
        """
        Test a weekly repeating chunk that lasts six days and
        spans 2 different months when it starts.
        """
        event = create_event(
            start_date=(2014, 3, 28),
            end_date=(2014, 4, 2),
            created_by=self.user,
            title="Khloe",
            description="'chunk' event that lasts 6 days and repeats weekly.",
            repeat="WEEKLY"
        )
        invalid_dates = {
            '2014': {
                '04': [3, 10, 17, 24],
                '05': [1, 8, 15, 22, 29],
                '06': [5, 12, 19, 26],
                '07': [3, 10, 17, 24, 31],
                '08': [7, 14, 21, 28],
                '09': [4, 11, 18, 25],
                '10': [2, 9, 16, 23, 30],
                '11': [6, 13, 20, 27],
                '12': [4, 11, 18, 25],
            },
            '2015': {
                '01': [1, 8, 15, 22, 29],
                '02': [5, 12, 19, 26],
                '03': [5, 12, 19, 26],
                '04': [2, 9, 16, 23, 30],
            }
        }

        for year, dates in invalid_dates.items():
            for month, days in dates.items():
                response = self.client.get(reverse(
                    'calendar:list', kwargs={'year': year, 'month': month}
                ))
                self.clean_whitespace(response)
                self.assertContains(response, event.title)

                for day in days:
                    self.assertNotContains(response, self.cal_str(day))

                [self.assertContains(response, self.cal_str(day)) for
                 day in xrange(1, monthrange(2014, int(month))[1] + 1)
                 if day not in days]
dataset/ETHPy150Open wreckage/django-happenings/tests/integration_tests/test_chunk_weekly_repeat.py/WeeklyRepeatingChunkEventListViewTest.test_weekly_repeating_chunk_six_days_span_two_months/original