utkarsharma2 commented on code in PR #35265:
URL: https://github.com/apache/airflow/pull/35265#discussion_r1375901647


##########
tests/providers/amazon/aws/operators/test_athena.py:
##########
@@ -201,6 +202,21 @@ def test_return_value(self, mock_conn, mock_run_query, 
mock_check_query_status):
 
         assert self.athena.execute(ti.get_template_context()) == 
ATHENA_QUERY_ID
 
+    @mock.patch.object(AthenaHook, "check_query_status", 
side_effect=("SUCCEEDED",))
+    @mock.patch.object(AthenaHook, "run_query", return_value=ATHENA_QUERY_ID)
+    @mock.patch.object(AthenaHook, "get_conn")
+    def test_optional_output_location(self, mock_conn, mock_run_query, 
mock_check_query_status):
+        op = AthenaOperator(**self.default_op_kwargs, aws_conn_id=None)
+
+        op.execute({})
+        mock_run_query.assert_called_once_with(
+            MOCK_DATA["query"],
+            query_context,
+            {},  # Should be an empty since we do not provide output_location

Review Comment:
   ```suggestion
               {},  # Should be an empty dict since we do not provide 
output_location
   ```



-- 
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