@override_settings(PUSHY_NOTIFICATION_MAX_AGE=datetime.timedelta(days=90))
    def test_delete_old_notifications_with_remaining_onces(self):
        for i in xrange(10):
            date_started = datetime.timedelta(days=91) - timezone.now()
            date_finished = date_started
            notification = PushNotification()
            notification.title = 'title {}'.format(i)
            notification.body = '{}'
            notification.sent = PushNotification.PUSH_SENT
            notification.date_started = date_started
            notification.date_finished = date_finished
            notification.save()

        for i in xrange(10):
            date_started = timezone.now() - datetime.timedelta(days=61)
            date_finished = date_started
            notification = PushNotification()
            notification.title = 'title {}'.format(i)
            notification.body = '{}'
            notification.sent = PushNotification.PUSH_SENT
            notification.date_started = date_started
            notification.date_finished = date_finished
            notification.save()

        clean_sent_notifications()

        self.assertEquals(PushNotification.objects.count(), 10)
dataset/ETHPy150Open rakanalh/django-pushy/tests/test_tasks.py/TasksTestCase.test_delete_old_notifications_with_remaining_onces/swapped operands of `-`