def test_get_occurrences(self):
        occurrences = Event.objects.get_occurrences(
            now(), now() + timedelta(days=7))
        self.assertEqual(len(occurrences), 1, msg=(
            '``get_occurrences`` should return the correct amount of'
            ' occurrences.'))

        occurrences = Event.objects.get_occurrences(now(), now())
        self.assertEqual(len(occurrences), 1, msg=(
            '``get_occurrences`` should return the correct amount of'
            ' occurrences for one day.'))
Test for the ``get_occurrences`` manager method.
dataset/ETHPy150Open bitmazk/django-calendarium/calendarium/tests/models_tests.py/EventModelManagerTestCase.test_get_occurrences