def testAllSundaysFallingIn(self): years = ldates.years_to_today() indices = [] for year in years: indices.extend(ldates.all_sundays_falling_in(year)) expected = range(0, ldates.first_sunday_on_or_after(date(years[-1] + 1, 1, 1))) self.assertEqual(indices, expected)
def first_sunday_with_data(self): """Returns week index of first Sunday after user's registration""" return ldates.first_sunday_on_or_after(self.registered)