From d5c37e247d79b7dca289a2f26ae8c938eeba26e1 Mon Sep 17 00:00:00 2001 From: Kensuke Nakazawa <62752589+knakazawa99@users.noreply.github.com> Date: Sun, 17 Mar 2024 17:03:49 +0900 Subject: [PATCH] fix for ut add region name --- tests/test_glue_job.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_glue_job.py b/tests/test_glue_job.py index dc8c2890..0c0ddac2 100644 --- a/tests/test_glue_job.py +++ b/tests/test_glue_job.py @@ -10,7 +10,7 @@ def glue_job_client(aws_credentials): with mock_glue(): boto_session = aws_credentials.get_boto3_session() - yield boto_session.client("glue") + yield boto_session.client("glue", region_name="us-east-1") async def test_fetch_result(aws_credentials, glue_job_client): @@ -118,6 +118,7 @@ async def test_trigger(aws_credentials, glue_job_client): arguments={"arg1": "value1"}, aws_credential=aws_credentials, ) + glue_job._get_client = MagicMock(side_effect=[glue_job_client]) glue_job._start_job = MagicMock(side_effect=["test_job_id"]) glue_job_run = await glue_job.trigger() assert isinstance(glue_job_run, GlueJobRun)