def test_create_backup(self):
        now = timezone.now()
        schedule = factories.BackupScheduleFactory(retention_time=3,  backup_source=self.backup_source)
        schedule._create_backup()
        backup = models.Backup.objects.get(backup_schedule=schedule)
        self.assertFalse(backup.kept_until is None)
        self.assertGreater(backup.kept_until, now - timedelta(days=schedule.retention_time))
dataset/ETHPy150Open opennode/nodeconductor/nodeconductor/backup/tests/unittests/test_models.py/BackupScheduleTest.test_create_backup/original