diff --git a/providers/amazon/tests/provider_tests/amazon/aws/hooks/test_emr.py b/providers/amazon/tests/provider_tests/amazon/aws/hooks/test_emr.py index e686554914acb..aaa572cc5e4f2 100644 --- a/providers/amazon/tests/provider_tests/amazon/aws/hooks/test_emr.py +++ b/providers/amazon/tests/provider_tests/amazon/aws/hooks/test_emr.py @@ -27,7 +27,7 @@ from botocore.exceptions import WaiterError from moto import mock_aws -from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning +from airflow.exceptions import AirflowException from airflow.providers.amazon.aws.hooks.emr import EmrHook @@ -174,9 +174,7 @@ def test_create_job_flow_extra_args(self): warnings.simplefilter("error") if sys.version_info >= (3, 12): # Botocore generates deprecation warning on Python 3.12 connected with utcnow use - warnings.filterwarnings( - "ignore", message=r".*datetime.utcnow.*", category=AirflowProviderDeprecationWarning - ) + warnings.filterwarnings("ignore", message=r".*datetime.utcnow.*", category=DeprecationWarning) cluster = hook.create_job_flow( {"Name": "test_cluster", "ReleaseLabel": "", "AmiVersion": "3.2", "Instances": {}} )