Skip to content

Commit

Permalink
Remove some unnecessary FAB test setup code (#45400)
Browse files Browse the repository at this point in the history
  • Loading branch information
jedcunningham authored Jan 4, 2025
1 parent 801b92e commit 345fd84
Showing 1 changed file with 1 addition and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,11 @@
# under the License.
from __future__ import annotations

import os
from datetime import datetime

import pendulum
import pytest

from airflow.api_connexion.exceptions import EXCEPTIONS_LINK_MAP
from airflow.models import DagBag, DagModel
from airflow.models.dag import DAG
from airflow.operators.empty import EmptyOperator
from airflow.models import DagModel
from airflow.security import permissions
from airflow.utils.session import provide_session

Expand Down Expand Up @@ -74,27 +69,6 @@ def configured_app(minimal_app_for_auth_api):
},
)

with DAG(
DAG_ID,
schedule=None,
start_date=datetime(2020, 6, 15),
doc_md="details",
params={"foo": 1},
tags=["example"],
) as dag:
EmptyOperator(task_id=TASK_ID)

with DAG(DAG2_ID, schedule=None, start_date=datetime(2020, 6, 15)) as dag2: # no doc_md
EmptyOperator(task_id=TASK_ID)

with DAG(DAG3_ID, schedule=None) as dag3: # DAG start_date set to None
EmptyOperator(task_id=TASK_ID, start_date=datetime(2019, 6, 12))

dag_bag = DagBag(os.devnull, include_examples=False)
dag_bag.dags = {dag.dag_id: dag, dag2.dag_id: dag2, dag3.dag_id: dag3}

app.dag_bag = dag_bag

yield app

delete_user(app, username="test_granular_permissions")
Expand Down

0 comments on commit 345fd84

Please sign in to comment.