This is an automated email from the ASF dual-hosted git repository.
husseinawala 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 357b80ff9e Fix warnings aws providers s3 hook tests (#34581)
357b80ff9e is described below
commit 357b80ff9e332fda26373f1d8f2cf20cab1cee81
Author: Jose Thomas <[email protected]>
AuthorDate: Sun Sep 24 06:31:51 2023 -0700
Fix warnings aws providers s3 hook tests (#34581)
* Add update on aws s3 unitetests connection parameter warningd
* Update s3 connection parameters on s3 hook tests
---------
Co-authored-by: Jose Thomas <[email protected]>
---
tests/providers/amazon/aws/hooks/test_s3.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/providers/amazon/aws/hooks/test_s3.py
b/tests/providers/amazon/aws/hooks/test_s3.py
index 686ef943ca..73c51f8e8f 100644
--- a/tests/providers/amazon/aws/hooks/test_s3.py
+++ b/tests/providers/amazon/aws/hooks/test_s3.py
@@ -1298,9 +1298,9 @@ def test_unify_and_provide_bucket_name_combination(
first.
"""
if has_conn == "with_conn":
- c = Connection(schema="conn_bucket")
+ c = Connection(extra={"service_config": {"s3": {"bucket_name":
"conn_bucket"}}})
else:
- c = Connection(schema=None)
+ c = Connection()
key = "key.txt" if key_kind == "rel_key" else "s3://key_bucket/key.txt"
if has_bucket == "with_bucket":
kwargs = {"bucket_name": "kwargs_bucket", "key": key}
@@ -1347,9 +1347,9 @@ def test_unify_and_provide_bucket_name_combination(
@patch("airflow.hooks.base.BaseHook.get_connection")
def test_s3_head_object_decorated_behavior(mock_conn, has_conn, has_bucket,
key_kind, expected):
if has_conn == "with_conn":
- c = Connection(schema="conn_bucket")
+ c = Connection(extra={"service_config": {"s3": {"bucket_name":
"conn_bucket"}}})
else:
- c = Connection(schema=None)
+ c = Connection()
mock_conn.return_value = c
key = "key.txt" if key_kind == "rel_key" else "s3://key_bucket/key.txt"
if has_bucket == "with_bucket":