Skip to content

Commit

Permalink
add teardown in test
Browse files Browse the repository at this point in the history
  • Loading branch information
Sneha Prabhu authored and prabhusneha committed Nov 24, 2024
1 parent 5f2519f commit 8fda581
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 1 addition & 3 deletions airflow/api_fastapi/core_api/routes/public/extra_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions tests/api_fastapi/core_api/routes/public/test_extra_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 8fda581

Please sign in to comment.