def test_aws_config(self): args_test = copy.copy(default_args_test) args_test["dbnd_config"] = { "databand": { "env": "aws" }, "aws": { EnvConfig.root: TEST_ENV__AWS_ROOT }, } with DAG(dag_id="test_aws_config", default_args=args_test) as dag_operators: t_A() result = run_and_get(dag_operators, task_id="t_A") b_result = result["result"] assert b_result.startswith("s3://dbnd-test/databand_project/dev/")
def test_jinja_arg_to_task(self): results = run_and_get(jinja_to_task_dag, "bool_to_string") parsed_result = read_xcom_result_value(results) assert parsed_result == "False"
def test_nested_pipeline_jinja_arg(self): results = run_and_get(nested_pipeline_dag, "my_xcom_pipeline") first_result = read_xcom_result_value(results, "result_1") second_result = read_xcom_result_value(results, "result_2") assert "SEPARATOR" in first_result assert "SEPARATOR" not in second_result
def test_simple_pipeline_jinja_arg(self): results = run_and_get(simple_jinja_dag, "my_second_pipeline") parsed_result = read_xcom_result_value(results) assert "SEPARATOR" in parsed_result
def test_dag_config_run(self): result = run_and_get(dag_with_config, task_id="t_A") actual = read_xcom_result_value(result) assert actual == "from_configfrom_config"
def test_dag_pipeline_run(self): result = run_and_get(dag_with_pipeline, task_id="t_A") actual = read_xcom_result_value(result) assert actual == "from_pipeline_ctorfrom_pipeline_ctor"
def test_simple_2_run(self): assert len(dag_simple_run_wiring.tasks) == 2 result = run_and_get(dag_simple_run_wiring, task_id="t_B") assert read_xcom_result_value(result) == "checkcheckt_B"
def test_simple_run(self): actual = run_and_get(dag_simple_build, "t_A") assert read_xcom_result_value(actual) == "checkcheck"
def test_customer_dag_run(self): from dbnd_test_scenarios.airflow_scenarios.client_scoring.ingest_data import ( customer_ingest_dag, ) actual = run_and_get(customer_ingest_dag, "create_report") assert actual