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

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

                [self.assertNotContains(response, self.cal_str(day)) for
                 day in xrange(1, monthrange(2014, int(month))[1] + 1)
                 if day not in days]
Convenience method for adding just a callback.
dataset/ETHPy150Open wreckage/django-happenings/tests/integration_tests/test_repeat.py/RepeatingEventListViewTest.check_dates_yearly--crossover with--dataset/ETHPy150Open twisted/twisted/twisted/internet/defer.py/Deferred.addCallback