feluelle commented on a change in pull request #7688: [AIRFLOW-6794] Allow AWS
Operator RedshiftToS3Transfer To Run a Custom Query
URL: https://github.com/apache/airflow/pull/7688#discussion_r400921868
##########
File path: tests/providers/amazon/aws/operators/test_redshift_to_s3.py
##########
@@ -76,3 +76,55 @@ def test_execute(self, table_as_file_name, expected_s3_key,
mock_run, mock_sessi
assert mock_run.call_count == 1
assert_equal_ignore_multiple_spaces(self, mock_run.call_args[0][0],
unload_query)
+
+ @parameterized.expand([
+ [None],
+ ["SELECT * FROM schema.table;"],
+ ])
+ @mock.patch("boto3.session.Session")
+ @mock.patch("airflow.providers.postgres.hooks.postgres.PostgresHook.run")
+ def test_transfer_customquery_success(self, expected_custom_select_query,
mock_run, mock_session,):
Review comment:
```suggestion
def test_transfer_customquery_success(self,
expected_custom_select_query, mock_run, mock_session):
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services