This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new ecc0e0e13c4 Fix failing eks tests with new moto 5.1.2 (#48556)
ecc0e0e13c4 is described below
commit ecc0e0e13c4a1031f228aeae30c2fbd04bed9b05
Author: Jarek Potiuk <[email protected]>
AuthorDate: Sun Mar 30 23:45:18 2025 +0200
Fix failing eks tests with new moto 5.1.2 (#48556)
---
generated/provider_dependencies.json | 2 +-
providers/amazon/pyproject.toml | 2 +-
providers/amazon/src/airflow/providers/amazon/get_provider_info.py | 2 +-
providers/amazon/tests/unit/amazon/aws/hooks/test_eks.py | 5 +++--
4 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/generated/provider_dependencies.json
b/generated/provider_dependencies.json
index 7e9037af170..3883ff3b2df 100644
--- a/generated/provider_dependencies.json
+++ b/generated/provider_dependencies.json
@@ -45,7 +45,7 @@
"devel-deps": [
"aiobotocore>=2.13.0",
"aws_xray_sdk>=2.12.0",
- "moto[cloudformation,glue]>=5.0.0",
+ "moto[cloudformation,glue]>=5.1.2",
"mypy-boto3-appflow>=1.37.0",
"mypy-boto3-rds>=1.34.90",
"mypy-boto3-redshift-data>=1.34.0",
diff --git a/providers/amazon/pyproject.toml b/providers/amazon/pyproject.toml
index 8a55971985c..c89072723cb 100644
--- a/providers/amazon/pyproject.toml
+++ b/providers/amazon/pyproject.toml
@@ -165,7 +165,7 @@ dev = [
# Additional devel dependencies (do not remove this line and add extra
development dependencies)
"aiobotocore>=2.13.0",
"aws_xray_sdk>=2.12.0",
- "moto[cloudformation,glue]>=5.0.0",
+ "moto[cloudformation,glue]>=5.1.2",
"mypy-boto3-appflow>=1.37.0",
"mypy-boto3-rds>=1.34.90",
"mypy-boto3-redshift-data>=1.34.0",
diff --git a/providers/amazon/src/airflow/providers/amazon/get_provider_info.py
b/providers/amazon/src/airflow/providers/amazon/get_provider_info.py
index 5e3fb340b07..3253f33a81e 100644
--- a/providers/amazon/src/airflow/providers/amazon/get_provider_info.py
+++ b/providers/amazon/src/airflow/providers/amazon/get_provider_info.py
@@ -1410,7 +1410,7 @@ def get_provider_info():
"devel-dependencies": [
"aiobotocore>=2.13.0",
"aws_xray_sdk>=2.12.0",
- "moto[cloudformation,glue]>=5.0.0",
+ "moto[cloudformation,glue]>=5.1.2",
"mypy-boto3-appflow>=1.37.0",
"mypy-boto3-rds>=1.34.90",
"mypy-boto3-redshift-data>=1.34.0",
diff --git a/providers/amazon/tests/unit/amazon/aws/hooks/test_eks.py
b/providers/amazon/tests/unit/amazon/aws/hooks/test_eks.py
index 9234eec8f15..ed95a4f75e5 100644
--- a/providers/amazon/tests/unit/amazon/aws/hooks/test_eks.py
+++ b/providers/amazon/tests/unit/amazon/aws/hooks/test_eks.py
@@ -22,6 +22,7 @@ from copy import deepcopy
from pathlib import Path
from typing import TYPE_CHECKING
from unittest import mock
+from unittest.mock import PropertyMock
from urllib.parse import urlsplit
import pytest
@@ -479,7 +480,7 @@ class TestEksHooks:
clusterName=generated_test_data.cluster_name,
)
- with mock.patch("moto.eks.models.Cluster.isActive",
return_value=False):
+ with mock.patch("moto.eks.models.Cluster.is_active",
new_callable=PropertyMock(return_value=False)):
with pytest.raises(ClientError) as raised_exception:
eks_hook.create_nodegroup(
clusterName=generated_test_data.cluster_name,
@@ -881,7 +882,7 @@ class TestEksHooks:
clusterName=generated_test_data.cluster_name,
)
- with mock.patch("moto.eks.models.Cluster.isActive",
return_value=False):
+ with mock.patch("moto.eks.models.Cluster.is_active",
new_callable=PropertyMock(return_value=False)):
with pytest.raises(ClientError) as raised_exception:
eks_hook.create_fargate_profile(
clusterName=generated_test_data.cluster_name,