From a12eaa2a78b8ad67e3fcaf72e9a558a7b6e0d2b1 Mon Sep 17 00:00:00 2001 From: lbbc-lh Date: Tue, 18 Aug 2026 19:12:07 +0800 Subject: [PATCH] Add tests for BaseConfigKeys iteration --- .../unit/always/test_project_structure.py | 1 - .../executors/utils/test_base_config_keys.py | 28 +++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 providers/amazon/tests/unit/amazon/aws/executors/utils/test_base_config_keys.py diff --git a/airflow-core/tests/unit/always/test_project_structure.py b/airflow-core/tests/unit/always/test_project_structure.py index 0d42a2201ca32..facdc2d21e490 100644 --- a/airflow-core/tests/unit/always/test_project_structure.py +++ b/airflow-core/tests/unit/always/test_project_structure.py @@ -68,7 +68,6 @@ def test_providers_modules_should_have_tests(self): "providers/amazon/tests/unit/amazon/aws/executors/ecs/test_ecs_executor_config.py", "providers/amazon/tests/unit/amazon/aws/executors/aws_lambda/test_utils.py", "providers/amazon/tests/unit/amazon/aws/executors/aws_lambda/docker/test_app.py", - "providers/amazon/tests/unit/amazon/aws/executors/utils/test_base_config_keys.py", "providers/amazon/tests/unit/amazon/aws/operators/test_emr.py", "providers/amazon/tests/unit/amazon/aws/operators/test_sagemaker.py", "providers/amazon/tests/unit/amazon/aws/sensors/test_emr.py", diff --git a/providers/amazon/tests/unit/amazon/aws/executors/utils/test_base_config_keys.py b/providers/amazon/tests/unit/amazon/aws/executors/utils/test_base_config_keys.py new file mode 100644 index 0000000000000..c5b4e2c6b685a --- /dev/null +++ b/providers/amazon/tests/unit/amazon/aws/executors/utils/test_base_config_keys.py @@ -0,0 +1,28 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +from __future__ import annotations + +from airflow.providers.amazon.aws.executors.utils.base_config_keys import BaseConfigKeys + + +class _ConfigKeys(BaseConfigKeys): + FIRST = "first" + SECOND = "second" + + +def test_iter_returns_non_dunder_attribute_values(): + assert set(_ConfigKeys()) == {"first", "second"}