def delete_many_builds(self, request): """Deletes scheduled or started builds in a bucket.""" service.delete_many_builds(request.bucket, request.status, tags=request.tag[:], created_by=request.created_by) return self.DeleteManyBuildsResponse()
def test_delete_many_completed_builds(self): with self.assertRaises(errors.InvalidInputError): service.delete_many_builds('chromium/try', model.BuildStatus.COMPLETED)
def test_delete_many_builds_schedule_task(self): service.delete_many_builds('chromium/try', model.BuildStatus.SCHEDULED)
def test_delete_many_builds_auth_error(self): self.mock_cannot(user.Action.DELETE_SCHEDULED_BUILDS) with self.assertRaises(auth.AuthorizationError): service.delete_many_builds('chromium/try', model.BuildStatus.SCHEDULED)
def delete_many_builds(self, request): """Deletes scheduled or started builds in a bucket.""" service.delete_many_builds( request.bucket, request.status, tags=request.tag[:], created_by=request.created_by) return self.DeleteManyBuildsResponse()
def test_delete_many_completed_builds(self): with self.assertRaises(errors.InvalidInputError): service.delete_many_builds( self.test_build.bucket, model.BuildStatus.COMPLETED)
def test_delete_many_builds_schedule_task(self): service.delete_many_builds( self.test_build.bucket, model.BuildStatus.SCHEDULED)
def test_delete_many_builds_auth_error(self): self.mock_cannot(acl.Action.DELETE_SCHEDULED_BUILDS) with self.assertRaises(auth.AuthorizationError): service.delete_many_builds( self.test_build.bucket, model.BuildStatus.SCHEDULED)