Skip to content

Commit

Permalink
fix dag serialization tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hussein-awala committed Aug 8, 2023
1 parent 14bd392 commit 191351c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/serialization/test_dag_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -2093,6 +2093,7 @@ def test_operator_expand_serde():
"ui_fgcolor": "#000",
"_disallow_kwargs_override": False,
"_expand_input_attr": "expand_input",
"template_in_template": False,
}

op = SerializedBaseOperator.deserialize_operator(serialized)
Expand Down Expand Up @@ -2145,6 +2146,7 @@ def test_operator_expand_xcomarg_serde():
"ui_fgcolor": "#000",
"_disallow_kwargs_override": False,
"_expand_input_attr": "expand_input",
"template_in_template": False,
}

op = SerializedBaseOperator.deserialize_operator(serialized)
Expand Down Expand Up @@ -2200,6 +2202,7 @@ def test_operator_expand_kwargs_literal_serde(strict):
"ui_fgcolor": "#000",
"_disallow_kwargs_override": strict,
"_expand_input_attr": "expand_input",
"template_in_template": False,
}

op = SerializedBaseOperator.deserialize_operator(serialized)
Expand Down Expand Up @@ -2246,6 +2249,7 @@ def test_operator_expand_kwargs_xcomarg_serde(strict):
"ui_fgcolor": "#000",
"_disallow_kwargs_override": strict,
"_expand_input_attr": "expand_input",
"template_in_template": False,
}

op = SerializedBaseOperator.deserialize_operator(serialized)
Expand Down Expand Up @@ -2359,6 +2363,7 @@ def x(arg1, arg2, arg3):
"template_fields_renderers": {"templates_dict": "json", "op_args": "py", "op_kwargs": "py"},
"_disallow_kwargs_override": False,
"_expand_input_attr": "op_kwargs_expand_input",
"template_in_template": False,
}

deserialized = SerializedBaseOperator.deserialize_operator(serialized)
Expand Down Expand Up @@ -2451,6 +2456,7 @@ def x(arg1, arg2, arg3):
"template_fields_renderers": {"templates_dict": "json", "op_args": "py", "op_kwargs": "py"},
"_disallow_kwargs_override": strict,
"_expand_input_attr": "op_kwargs_expand_input",
"template_in_template": False,
}

deserialized = SerializedBaseOperator.deserialize_operator(serialized)
Expand Down Expand Up @@ -2572,6 +2578,7 @@ def operator_extra_links(self):
"_task_module": "tests.serialization.test_dag_serialization",
"_is_empty": False,
"_is_mapped": True,
"template_in_template": False,
}
deserialized_dag = SerializedDAG.deserialize_dag(serialized_dag)
assert deserialized_dag.task_dict["task"].operator_extra_links == [AirflowLink2()]

0 comments on commit 191351c

Please sign in to comment.