Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

248
Vistas
Unittest Airflow plugins

I have an airflow instance, and created some flask APIs as plugins. I am wondering if there is any way I can run some unittests for these APIs without them being dependent on Airflow?

from flask_appbuilder.api import BaseApi, expose
from flask import send_file, request

class SomeApi(BaseApi):
    route_base = "/api/v1/someapi/"

    @expose("/upload/<path:path>", methods=["POST"])
    def upload_file(self, path: str):
        file = request.files["file"]
        config = self.api_config()
        .
        .
        return self.response(201, path=target_file_path, message=None)

some_api_nomenu_view = SomeApi()
some_api_nomenu_package = {"view": some_api_nomenu_view}

class SomeApiPlugin(AirflowPlugin):
    name = "some_api_name"
    appbuilder_views = [some_api_nomenu_package]

How could you test in this case the upload_file for example? Any help on this is much appreciated, I am new to flask.

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda