From 8fda5816b606844861f5da955c5c942a49951ab4 Mon Sep 17 00:00:00 2001 From: Sneha Prabhu Date: Sun, 24 Nov 2024 20:57:26 +0530 Subject: [PATCH] add teardown in test --- airflow/api_fastapi/core_api/routes/public/extra_links.py | 4 +--- tests/api_fastapi/core_api/routes/public/test_extra_links.py | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/airflow/api_fastapi/core_api/routes/public/extra_links.py b/airflow/api_fastapi/core_api/routes/public/extra_links.py index 21b5eff3a039f..2ab957cb93fb7 100644 --- a/airflow/api_fastapi/core_api/routes/public/extra_links.py +++ b/airflow/api_fastapi/core_api/routes/public/extra_links.py @@ -43,9 +43,7 @@ @extra_links_router.get( "", - responses=create_openapi_http_exception_doc( - [status.HTTP_404_NOT_FOUND] - ), + responses=create_openapi_http_exception_doc([status.HTTP_404_NOT_FOUND]), ) async def get_extra_links( dag_id: str, diff --git a/tests/api_fastapi/core_api/routes/public/test_extra_links.py b/tests/api_fastapi/core_api/routes/public/test_extra_links.py index 33cdd67a6b8ce..6b1d6b4077d0a 100644 --- a/tests/api_fastapi/core_api/routes/public/test_extra_links.py +++ b/tests/api_fastapi/core_api/routes/public/test_extra_links.py @@ -82,6 +82,9 @@ def setup(self, test_client, session=None) -> None: **triggered_by_kwargs, ) + def teardown_method(self) -> None: + self._clear_db() + def _create_dag(self): with DAG(dag_id=self.dag_id, schedule=None, default_args={"start_date": self.default_time}) as dag: CustomOperator(task_id=self.task_single_link, bash_command="TEST_LINK_VALUE")