hussein-awala commented on code in PR #36363:
URL: https://github.com/apache/airflow/pull/36363#discussion_r1435386945


##########
tests/providers/amazon/aws/hooks/test_s3.py:
##########
@@ -812,6 +813,30 @@ async def 
test_s3_key_hook_is_keys_unchanged_inactivity_error_async(self, mock_l
             "message": "FAILURE: Inactivity Period passed, not enough objects 
found in test_bucket/test",
         }
 
+    @pytest.mark.asyncio
+    
@async_mock.patch("airflow.providers.amazon.aws.triggers.s3.S3Hook.async_conn")
+    
@async_mock.patch("airflow.providers.amazon.aws.triggers.s3.S3Hook._list_keys_async")
+    async def 
test_s3_key_hook_is_keys_unchanged_pending_async_with_tzinfo(self, 
mock_list_keys, mock_client):
+        """
+        Test is_key_unchanged gives AirflowException.
+        """
+        mock_list_keys.return_value = []
+
+        s3_hook_async = S3Hook(client_type="S3", resource_type="S3")
+
+        response = await s3_hook_async.is_keys_unchanged_async(
+            client=mock_client.return_value,
+            bucket_name="test_bucket",
+            prefix="test",
+            inactivity_period=1,
+            min_objects=0,
+            previous_objects=set(),
+            inactivity_seconds=0,
+            allow_delete=False,
+            last_activity_time=std_datetime.now(timezone.utc),

Review Comment:
   could you add a test with an offset-naive datetime?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to