Taragolis commented on code in PR #38178:
URL: https://github.com/apache/airflow/pull/38178#discussion_r1526790222


##########
tests/providers/amazon/aws/operators/test_base_aws.py:
##########
@@ -171,3 +177,40 @@ class SoWrongOperator(AwsBaseOperator):
         error_match = r"Class attribute 'SoWrongOperator.aws_hook_class' is 
not a subclass of AwsGenericHook"
         with pytest.raises(AttributeError, match=error_match):
             SoWrongOperator(task_id="fake-task-id")
+
+    @pytest.mark.parametrize(
+        "region, region_name, expected_region_name",
+        [
+            pytest.param("ca-west-1", None, "ca-west-1", id="region-only"),
+            pytest.param("us-west-1", "us-west-1", "us-west-1", 
id="non-ambiguous-params"),

Review Comment:
   I work for fake operators based on AwsBaseOperator / AwsBaseSensor which do 
simple actions nothing on execute.
   For EcsRunTaskOperator it also works, however it required to do additional 
thing just for not break other tests.
   I still tried to find a better way to do that kind of test, the last resort 
would be a mock as we do for other test.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to