def METHOD_NAME(self):
    task_sync = TaskLibrarySync()
    task_sync.batch_size = 1
    good_task = 'task3.rpm'
    good_task_url = '%s%s' % (self.task_url, good_task)
    # We need this URL to end up sorted after the real one, hence 'x'
    bad_task = 'thisisnotreal.rpm'
    bad_task_url = '%s%s' % ('http://x.example.com/', bad_task)
    task_rpm_disk = os.path.join(task_sync.tasklib.rpmspath, good_task)
    try:
        task_sync.sync_tasks([good_task_url, bad_task_url])
    except Exception:
        pass
    with session.begin():
        tasks = Task.query.filter(Task.rpm == good_task).all()
        self.assertEqual(len(tasks), 1)
        tasks = Task.query.filter(Task.rpm == bad_task).all()
        self.assertEqual(len(tasks), 0)
    self.assertTrue(os.path.exists(task_rpm_disk))