def test_periods(self):
        yesterday = date.today() - timedelta(days=1)
        day_before = yesterday - timedelta(days=1)
        cohort = Cohort(start_date=day_before, end_date=yesterday,
                        retention_periods=[40, 20, 60])
        self.assertEqual(cohort.periods[0].start_day, 1)
        self.assertEqual(cohort.periods[0].end_day, 20)
        self.assertEqual(cohort.periods[1].start_day, 20)
        self.assertEqual(cohort.periods[1].end_day, 40)
        self.assertEqual(cohort.periods[2].start_day, 40)
        self.assertEqual(cohort.periods[2].end_day, 60)
dataset/ETHPy150Open e-loue/django-lean/django_lean/lean_retention/tests/test_reports.py/TestCohort.test_periods/original