Skip to content

Commit

Permalink
Add serialization test for glue trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
jimwbaldwin committed Nov 5, 2024
1 parent 06faeae commit f7cfb20
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions providers/tests/amazon/aws/triggers/test_glue.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,25 @@ async def test_wait_job_failed(self, get_state_mock: mock.MagicMock):

assert get_state_mock.call_count == 3

def test_serialization(self):
trigger = GlueJobCompleteTrigger(
job_name="job_name",
run_id="JobRunId",
verbose=False,
aws_conn_id="aws_conn_id",
job_poll_interval=0.1,
)
classpath, kwargs = trigger.serialize()
assert classpath == "airflow.providers.amazon.aws.triggers.glue.GlueJobCompleteTrigger"
assert bool(kwargs["verbose"]) == False
assert kwargs == {
"job_name": "job_name",
"run_id": "JobRunId",
"verbose": False,
"aws_conn_id": "aws_conn_id",
"job_poll_interval": 0.1,
}


class TestGlueCatalogPartitionSensorTrigger:
@pytest.mark.asyncio
Expand Down

0 comments on commit f7cfb20

Please sign in to comment.