def test_sync_repository(self): version = self.project.versions.get(slug=LATEST) with mock_api(self.repo): sync_repository = tasks.SyncRepositoryTask() result = sync_repository.apply_async( args=(version.pk,), ) self.assertTrue(result.successful())
def handle(self, *args, **options): if args: for slug in args: version = utils.version_from_slug(slug, LATEST) tasks.SyncRepositoryTask().run(version.pk, )